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 891b923 commit b9eef14Copy full SHA for b9eef14
twitter_ads/error.py
@@ -41,7 +41,7 @@ def __str__(self):
41
@staticmethod
42
def from_response(response):
43
"""Returns the correct error type from a ::class::`Response` object."""
44
- if response.code:
+ if response.code and response.code in ERRORS:
45
return ERRORS[response.code](response)
46
else:
47
return Error(response)
0 commit comments