Skip to content

Commit 035a53b

Browse files
enhanced error logs
1 parent ed862d0 commit 035a53b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/unstract/api_deployments/client.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ def structure_file(self, file_paths: list[str]) -> dict:
147147
response_data = response.json()
148148
response_message = response_data.get("message", {})
149149
except JSONDecodeError:
150-
self.logger.error("Failed to decode JSON response", exc_info=True)
150+
self.logger.error(
151+
"Failed to decode JSON response. Raw response: %s",
152+
response.text,
153+
exc_info=True,
154+
)
151155
obj_to_return = {
152156
"status_code": response.status_code,
153157
"pending": False,
@@ -227,7 +231,11 @@ def check_execution_status(self, status_check_api_endpoint: str) -> dict:
227231
try:
228232
response_data = response.json()
229233
except JSONDecodeError:
230-
self.logger.error("Failed to decode JSON response", exc_info=True)
234+
self.logger.error(
235+
"Failed to decode JSON response. Raw response: %s",
236+
response.text,
237+
exc_info=True,
238+
)
231239
obj_to_return = {
232240
"status_code": response.status_code,
233241
"pending": False,

0 commit comments

Comments
 (0)