Skip to content

Commit 854b868

Browse files
committed
Refactor QueryParser error handling for consistency and clarity
- Improve code readability while maintaining identical functionality
1 parent bb839d7 commit 854b868

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

botocore/parsers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,9 @@ def _do_error_parse(self, response, shape):
598598
status_code = response.get('status_code')
599599
if status_code and status_code in http.client.responses:
600600
status_message = http.client.responses[status_code]
601-
error_msg_with_status = (
601+
raise ResponseParserError(
602602
f"{str(e)} (HTTP {status_code}: {status_message})"
603603
)
604-
raise ResponseParserError(error_msg_with_status)
605604
raise
606605
parsed = self._build_name_to_xml_node(root)
607606
self._replace_nodes(parsed)

0 commit comments

Comments
 (0)