diff --git a/pkg/config-api-provider/provider/util/error_handling.go b/pkg/config-api-provider/provider/util/error_handling.go index 6ef1c319..95841630 100644 --- a/pkg/config-api-provider/provider/util/error_handling.go +++ b/pkg/config-api-provider/provider/util/error_handling.go @@ -25,8 +25,7 @@ func (r ResponseStatusCheck) RaiseForStatus() (bool, string) { case *url.Error: detail = r.handleURLError(e) default: - err := json.NewDecoder(r.Response.Body).Decode(&data) - if err != nil { + if err := json.NewDecoder(r.Response.Body).Decode(&data); err != nil { detail = "Unexpected error: " + r.Err.Error() } else { detail = data["message"].(string) + "\nDebugID: " + data["debugId"].(string)