Skip to content

remove aws query compatible protocol test#1424

Merged
AndrewFossAWS merged 1 commit intomainfrom
fossand
Sep 24, 2022
Merged

remove aws query compatible protocol test#1424
AndrewFossAWS merged 1 commit intomainfrom
fossand

Conversation

@AndrewFossAWS
Copy link
Copy Markdown
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