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 e77c22b commit 1959639Copy full SHA for 1959639
polygon/rest/base.py
@@ -112,7 +112,11 @@ def _get(
112
if raw:
113
return resp
114
115
- obj = self._decode(resp)
+ try:
116
+ obj = self._decode(resp)
117
+ except ValueError as e:
118
+ print(f"Error decoding json response: {e}")
119
+ return []
120
121
if result_key:
122
if result_key not in obj:
@@ -193,7 +197,13 @@ def _paginate_iter(
193
197
raw=True,
194
198
options=options,
195
199
)
196
- decoded = self._decode(resp)
200
+
201
202
+ decoded = self._decode(resp)
203
204
205
206
207
if result_key not in decoded:
208
return []
209
for t in decoded[result_key]:
0 commit comments