We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a83535 commit 3d3d01dCopy full SHA for 3d3d01d
packages/smithy-aws-core/src/smithy_aws_core/aio/protocols.py
@@ -22,7 +22,8 @@ def identify(
22
if self._HEADER_KEY not in response.fields:
23
return None
24
25
- code = response.fields[self._HEADER_KEY].values[0]
+ error_field = response.fields[self._HEADER_KEY]
26
+ code = error_field.values[0] if len(error_field.values) > 0 else None
27
if not code:
28
29
packages/smithy-http/src/smithy_http/aio/protocols.py
@@ -144,7 +144,7 @@ def _is_success(
144
context: TypedProperties,
145
response: HTTPResponse,
146
) -> bool:
147
- return 200 <= response.status <= 299
+ return 200 <= response.status < 300
148
149
async def _create_error(
150
self,
0 commit comments