Handle non-json errors from the API

This commit is contained in:
Arve Knudsen 2017-11-21 11:33:58 +01:00
parent 573489fbea
commit ed58d2b381
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ func CheckResponse(r *http.Response) error {
if err == nil && len(data) > 0 {
err := json.Unmarshal(data, errorResponse)
if err != nil {
return err
errorResponse.Message = string(data)
}
}