Skip to content

Commit

Permalink
private/protocol/rest: Fix return error in location errors (#4138)
Browse files Browse the repository at this point in the history
Fixes #4120 by returning error from unmarshalHeaderMap method.
  • Loading branch information
RomanSerikov committed Dec 7, 2021
1 parent 48c9ecd commit 1affa97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion private/protocol/rest/unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func unmarshalLocationElements(resp *http.Response, v reflect.Value, lowerCaseHe
prefix := field.Tag.Get("locationName")
err := unmarshalHeaderMap(m, resp.Header, prefix, lowerCaseHeaderMaps)
if err != nil {
awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
}
}
}
Expand Down

0 comments on commit 1affa97

Please sign in to comment.