From 1c9ff3096b5c0785d456a489fb2a38394cb6e63b Mon Sep 17 00:00:00 2001 From: 1riatsila1 Date: Thu, 10 Oct 2024 14:12:32 +0200 Subject: [PATCH] neatening up --- pkg/config-api-provider/provider/util/error_handling.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)