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
7 changes: 7 additions & 0 deletions .chronus/changes/python-ignoreAllErrors-2026-1-3-14-24-46.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@typespec/http-client-python"
---

Ignore all errors thrown during error deserialization, not just `DeserializationError`
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ def _failsafe_deserialize(
) -> typing.Any:
try:
return _deserialize(deserializer, response.json(), module, rf, format)
except DeserializationError:
except Exception: # pylint: disable=broad-except
_LOGGER.warning(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization",
exc_info=True
Expand All @@ -1072,11 +1072,11 @@ def _failsafe_deserialize(

def _failsafe_deserialize_xml(
deserializer: typing.Any,
response: HttpResponse,
response: HttpResponse,
) -> typing.Any:
try:
return _deserialize_xml(deserializer, response.text())
except DeserializationError:
except Exception: # pylint: disable=broad-except
_LOGGER.warning(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization",
exc_info=True
Expand Down
Loading