[twitter] report API errors as generic StopExtraction exceptions
prevents duplicate logging messages for nonexistent users (#1759)
This commit is contained in:
@@ -749,8 +749,8 @@ class TwitterAPI():
|
|||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
msg = data["errors"]
|
msg = data["errors"]
|
||||||
if response.status_code < 400:
|
if msg and response.status_code < 400:
|
||||||
self.extractor.log.warning(msg)
|
raise exception.StopExtraction(msg)
|
||||||
else:
|
else:
|
||||||
msg = ""
|
msg = ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user