[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:
|
||||
msg = data["errors"]
|
||||
if response.status_code < 400:
|
||||
self.extractor.log.warning(msg)
|
||||
if msg and response.status_code < 400:
|
||||
raise exception.StopExtraction(msg)
|
||||
else:
|
||||
msg = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user