Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add awsQueryCompatible error code translation support #4597

Merged
merged 14 commits into from
Dec 28, 2022
Prev Previous commit
Next Next commit
simplify generic errors
  • Loading branch information
eddy-aws committed Dec 14, 2022
commit ef33e605a1733c8aca21c80f106dc8603111f05e
6 changes: 1 addition & 5 deletions private/protocol/jsonrpc/unmarshal_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ func (u *UnmarshalTypedError) UnmarshalError(
}

if queryCodeParts != nil && len(queryCodeParts) == 2 {
return awserr.NewRequestFailure(
awserr.New(queryCodeParts[0], msg, nil),
respMeta.StatusCode,
respMeta.RequestID,
), nil
code = queryCodeParts[0]
}

// fallback to unmodeled generic exceptions
Expand Down