Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "enhancement",
"description": "Improved default error message for instances of ClientTimeoutError."
}
4 changes: 1 addition & 3 deletions packages/smithy-core/src/smithy_core/aio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,7 @@ async def _handle_attempt[I: SerializeableShape, O: DeserializeableShape](
)
except Exception as e:
if isinstance(e, self.transport.TIMEOUT_EXCEPTIONS):
raise ClientTimeoutError(
message=f"Client timeout occurred: {e}"
) from e
raise ClientTimeoutError(message="A timeout error occurred.") from e
raise

_LOGGER.debug("Received response: %s", transport_response)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "enhancement",
"description": "Improved error messaging for CRT-based timeout errors."
}
2 changes: 1 addition & 1 deletion packages/smithy-http/src/smithy_http/aio/crt.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ async def send(
return await self._await_response(crt_stream)
except AwsCrtError as e:
if e.name in self._TIMEOUT_ERROR_NAMES:
raise _CRTTimeoutError() from e
raise _CRTTimeoutError(f"CRT {e.name}: {e.message}") from e
raise

async def _await_response(
Expand Down
Loading