Skip to content

Commit

Permalink
client: Fix unnecessary error formatting (#14596)
Browse files Browse the repository at this point in the history
Addresses comment
#14587 (comment)
  • Loading branch information
tomponline authored Dec 6, 2024
2 parents 81495c0 + 9430b67 commit 19d7af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/lxd.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func lxdParseResponse(resp *http.Response) (*api.Response, string, error) {

// Handle errors
if response.Type == api.ErrorResponse {
return nil, "", api.StatusErrorf(resp.StatusCode, "%s", response.Error)
return nil, "", api.NewStatusError(resp.StatusCode, response.Error)
}

return &response, etag, nil
Expand Down

0 comments on commit 19d7af9

Please sign in to comment.