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

Conversation

eddy-aws
Copy link
Contributor

@eddy-aws eddy-aws commented Oct 24, 2022

The awsQueryCompatible error code is returned if the error header is found in the response. This is a pre-requisite for migrating services from AWSQuery wire protocol to AWSJson. Detailed description of this change if AWSQueryCompatible trait is present:

  • a new map queryException is created. This maps the error code to exception function that creates typed error with a given error code
  • error structs are added a new code field
  • the Code() function would return a non-empty code value, else returns the default value
  • a typed error is created with query compatible error code and returned
  • a generic error with query compatible error code is returned for an untyped error

A test service has been generated for validating assumptions. Added unit tests as per the SEP.

isaiahvita
isaiahvita previously approved these changes Dec 5, 2022
@isaiahvita isaiahvita dismissed their stale review December 6, 2022 23:41

it appears that the existing PR will break customers

private/model/api/api.go Show resolved Hide resolved
private/model/api/shape.go Outdated Show resolved Hide resolved
private/protocol/jsonrpc/unmarshal_error.go Show resolved Hide resolved
private/protocol/jsonrpc/unmarshal_error.go Show resolved Hide resolved
private/protocol/jsonrpc/unmarshal_error.go Show resolved Hide resolved
@isaiahvita isaiahvita merged commit 698f054 into aws:main Dec 28, 2022
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