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

remove aws query compatible protocol test #1424

Merged
merged 1 commit into from
Sep 24, 2022
Merged

remove aws query compatible protocol test #1424

merged 1 commit into from
Sep 24, 2022

Conversation

AndrewFossAWS
Copy link
Contributor

@AndrewFossAWS AndrewFossAWS commented Sep 23, 2022

Description of changes:

Essentialy the protocol test is not able to verify fields not defined in the error structure. For example,

@awsQueryError(
    code: "CustomGreetingErrorCode",
    httpResponseCode: 402
)
@error("client")
structure CustomGreetingError {
    Message: String,
}

The httpResponseTests doc states params can only be compatible with the targeted error structure.

The actual error response looks something like this:

{  
  '$fault': 'client',
  '$metadata': {
    httpStatusCode: 402,
    requestId: '19a4103d-121d-5080-ac16-4b9b8ee81639',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  },
  Type: 'Sender',
  Code: 'CustomGreetingErrorCode',
  Message: "Hi"
}

The protocol test can only verify Message but not other fields like Code.

Note: AwsQueryCompatibleTrait will add Code to the error response.

This commit remove the redundant aws query compatible protocol test.


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

@AndrewFossAWS AndrewFossAWS requested a review from a team as a code owner September 23, 2022 22:04
@AndrewFossAWS AndrewFossAWS changed the title fix aws query compatible protocol test remove aws query compatible protocol test Sep 23, 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.

2 participants