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 awsJson10 Error Deserialization support. #535

Merged
merged 8 commits into from
Sep 18, 2024

Conversation

nathanhit
Copy link

Issue #, if available:

Description of changes:
Protocol Generator:

  • generateSharedDeserializers contains revisions that attain all error shapes and generate shared deserializers with regular member shapes
  • generateSharedDeserializes generates deserializers specific to each operation and additional error info functions
  • generateOperationErrorDeserializers handles all parts of error generation, including cycling through the different operations. There are 4 additional helper functions in protocol generator utilized here.

Deserialize Middleware:

  • Response Checks function calls the error deserializers if a non 200 error is reported

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@nathanhit nathanhit requested review from a team as code owners September 5, 2024 19:51
@nathanhit
Copy link
Author

Here is the generated code for the deserializers.go file:
deserializers.txt

Copy link
Contributor

@Madrigal Madrigal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a TODO here mentioning that we don't cover all errors? From Smithy docs

The component MUST be one of the following: an additional header with the name X-Amzn-Errortype, a body field with the name code, or a body field named __type

We're only covering the 3rd type, body field with __type

@lucix-aws lucix-aws merged commit 1af7b55 into feat-awsjson10 Sep 18, 2024
1 check passed
@lucix-aws lucix-aws deleted the feat-awsjson10-desErrors branch September 18, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants