Skip to content

Add noErrorWrapping protocol test for restXml #1574

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

Merged
16 changes: 16 additions & 0 deletions smithy-aws-protocol-tests/model/restXml/services/s3.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,22 @@ structure DeleteObjectTaggingOutput {
VersionId: ObjectVersionId
}

@httpResponseTests([
{
id: "S3OperationNoErrorWrappingResponse",
documentation: """
S3 operations return Error XML nodes unwrapped by
the ErrorResponse XML node.
""",
protocol: restXml,
code: 400,
headers: {
"Content-Type": "application/xml"
},
body: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error>\n\t<Type>Sender</Type>\n\t<Code>NoSuchBucket</Code>\n</Error>",
bodyMediaType: "application/xml",
}
])
@error("client")
structure NoSuchBucket {}

Expand Down