We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2ed4fc commit 756479bCopy full SHA for 756479b
seam/client.py
@@ -83,13 +83,17 @@ def _handle_error_response(self, response: requests.Response):
83
def _is_api_error_response(self, response: requests.Response) -> bool:
84
try:
85
content_type = response.headers.get("content-type", "")
86
+
87
if not isinstance(content_type, str) or not content_type.startswith(
88
"application/json"
89
):
90
return False
91
+ except ValueError:
92
+ return False
93
94
+ try:
95
data = response.json()
- except Exception:
96
+ except requests.exceptions.JSONDecodeError:
97
98
99
if not isinstance(data, dict):
0 commit comments