diff --git a/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-bugfix-05435b3fb9a54b86b4ebb4d61b0d13ae.json b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-bugfix-05435b3fb9a54b86b4ebb4d61b0d13ae.json new file mode 100644 index 000000000..a429fdad3 --- /dev/null +++ b/packages/smithy-aws-core/.changes/next-release/smithy-aws-core-bugfix-05435b3fb9a54b86b4ebb4d61b0d13ae.json @@ -0,0 +1,4 @@ +{ + "type": "bugfix", + "description": "Fixed awsQuery response deserialization for operations with no output members." +} diff --git a/packages/smithy-aws-core/src/smithy_aws_core/aio/protocols.py b/packages/smithy-aws-core/src/smithy_aws_core/aio/protocols.py index 4e7dfe25f..afaac61eb 100644 --- a/packages/smithy-aws-core/src/smithy_aws_core/aio/protocols.py +++ b/packages/smithy-aws-core/src/smithy_aws_core/aio/protocols.py @@ -364,10 +364,14 @@ def _action_name( def _response_wrapper_elements( self, operation: APIOperation[SerializeableShape, DeserializeableShape], - ) -> tuple[str, str]: + ) -> tuple[str, ...]: + name = operation.schema.id.name + # Operations with no output members will omit the element. + if not operation.output_schema.members: + return (f"{name}Response",) return ( - f"{operation.schema.id.name}Response", - f"{operation.schema.id.name}Result", + f"{name}Response", + f"{name}Result", ) def _error_wrapper_elements(self) -> tuple[str, ...]: