Skip to content

Commit

Permalink
Don't ignore JSON unmarshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein committed Apr 9, 2024
1 parent 308dc3d commit cf1ba2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/keystore/azure/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ func transportErrToStatus(err error) (status, error) {
if errors.As(err, &rerr) {
var errorResponse errorResponse
if rerr.RawResponse != nil {
json.NewDecoder(rerr.RawResponse.Body).Decode(&errorResponse)
err = json.NewDecoder(rerr.RawResponse.Body).Decode(&errorResponse)
if err != nil {
return status{}, err
}
}
return status{
ErrorCode: errorResponse.Error.Inner.Code,
Expand Down

0 comments on commit cf1ba2d

Please sign in to comment.