fix error serialization for default error members#6583
Merged
alexrashed merged 4 commits intomasterfrom Aug 3, 2022
Merged
Conversation
thrau
approved these changes
Aug 3, 2022
Member
thrau
left a comment
There was a problem hiding this comment.
LGTM! that's quite some digging you did there :-)
bentsku
approved these changes
Aug 3, 2022
Contributor
bentsku
left a comment
There was a problem hiding this comment.
LGTM! Wow, thanks for digging into this so fast and finding a solution! 🙏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses an issue with the error serialization mentioned in #6571.
After some digging, it turns out that there are several XML-services (
rest-xml,query) which define default members in their error shapes (f.e. cloudfront, route53, cloudwatch, iam,...). These default members are not added to the root node, while non-default members are.For JSON-services (
json,rest-json), there is no sub-element for the error metadata. All members are added to the root node. Here, defined default members in the spec can modify the casing (f.e.Messagein DynamoDB'sTransactionCanceledException).The following changes are contained in this PR:
__typefor json protocols do). F.e. in Lambda, the "Type" field on exceptions is "SOAP"-like and contains the value "User" to indicate that it's a user-triggered error.