-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
When the server responses with a 520 and 524 (afaik, maybe with other 5xx errors also happens)
twitter-python-ads-sdk/twitter_ads/error.py
Lines 13 to 16 in a3dd581
| if response.body and 'errors' in response.body: | |
| self._details = kwargs.get('details', response.body.get('errors')) | |
| else: | |
| self._details = None |
These lines return the error from the title because response.body is not a dictionary. A possible solution would be
if response.body and 'errors' in response.body:
if type(response.body) is dict:
self._details = kwargs.get('details', response.body.get('errors'))
else:
self._details = kwargs.get('details', [response.body])
else:
self._details = NoneBut I don't know if response.body contains something useful to return as "details". As it is a server side error, I have no way to reproduce it
Metadata
Metadata
Assignees
Labels
No labels