mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-04 05:52:24 +08:00
Added logging for opensubtitles.com 400 error. #2232
This commit is contained in:
parent
e2d0647d55
commit
e7703ca5a0
1 changed files with 10 additions and 1 deletions
|
@ -473,7 +473,16 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
|
|||
except Exception:
|
||||
status_code = None
|
||||
else:
|
||||
if status_code == 401:
|
||||
if status_code == 400:
|
||||
try:
|
||||
json_response = response.json()
|
||||
message = json_response['message']
|
||||
except JSONDecodeError:
|
||||
raise ProviderError('Invalid JSON returned by provider')
|
||||
else:
|
||||
log_request_response(response)
|
||||
raise ConfigurationError(message)
|
||||
elif status_code == 401:
|
||||
log_request_response(response)
|
||||
self.reset_token()
|
||||
if is_retry:
|
||||
|
|
Loading…
Reference in a new issue