Skip to content

Commit

Permalink
simplify generic errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eddy-aws committed Dec 14, 2022
1 parent 85ca501 commit ef33e60
Showing 1 changed file with 1 addition and 5 deletions.
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

0 comments on commit ef33e60

Please sign in to comment.