Add tags implementation
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
parent
2eb9b286ed
commit
7d630192dd
4 changed files with 98 additions and 25 deletions
|
@ -112,3 +112,10 @@ func parseHTTPErrorResponse(response *http.Response) error {
|
|||
}
|
||||
return &errors
|
||||
}
|
||||
|
||||
func handleErrorResponse(resp *http.Response) error {
|
||||
if resp.StatusCode >= 400 && resp.StatusCode < 500 {
|
||||
return parseHTTPErrorResponse(resp)
|
||||
}
|
||||
return &UnexpectedHTTPStatusError{Status: resp.Status}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue