fix rate limit handling for OAuth APIs (#368)

This commit is contained in:
Mike Fährmann
2019-08-03 13:43:00 +02:00
parent f687052daf
commit f4bc75e854
4 changed files with 5 additions and 4 deletions

View File

@@ -87,7 +87,8 @@ class Extractor():
raise exception.HttpError(exc)
else:
code = response.status_code
if 200 <= code < 400 or not fatal and \
if 200 <= code < 400 or fatal is None and \
(400 <= code < 500) or not fatal and \
(400 <= code < 429 or 431 <= code < 500):
if encoding:
response.encoding = encoding