Spaces:
Sleeping
Sleeping
meirk-brd
commited on
Commit
·
1711f91
1
Parent(s):
4e729a5
add logging
Browse files
tool.py
CHANGED
|
@@ -105,7 +105,8 @@ class BrightDataDatasetTool(Tool):
|
|
| 105 |
data = self._poll_snapshot(snapshot_id, api_token)
|
| 106 |
return json.dumps(data, indent=2)
|
| 107 |
except requests.exceptions.RequestException as exc:
|
| 108 |
-
|
|
|
|
| 109 |
|
| 110 |
def _build_params(
|
| 111 |
self,
|
|
|
|
| 105 |
data = self._poll_snapshot(snapshot_id, api_token)
|
| 106 |
return json.dumps(data, indent=2)
|
| 107 |
except requests.exceptions.RequestException as exc:
|
| 108 |
+
details = exc.response.text if getattr(exc, "response", None) is not None else ""
|
| 109 |
+
return json.dumps({"error": str(exc), "details": details, "payload": payload})
|
| 110 |
|
| 111 |
def _build_params(
|
| 112 |
self,
|