Skip to content

Commit

Permalink
neatening up
Browse files Browse the repository at this point in the history
  • Loading branch information
1riatsila1 committed Oct 10, 2024
1 parent 9148ced commit 1c9ff30
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/config-api-provider/provider/util/error_handling.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 31 in pkg/config-api-provider/provider/util/error_handling.go

View check run for this annotation

Codecov / codecov/patch

pkg/config-api-provider/provider/util/error_handling.go#L24-L31

Added lines #L24 - L31 were not covered by tests
Expand Down

0 comments on commit 1c9ff30

Please sign in to comment.