mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-08-16 12:31:35 +00:00
Catch and raise bad status 400
When the request is malformed. Added logging to hopefully get to the bottom of a bug pulling albums from server.
This commit is contained in:
parent
43277ac2d6
commit
e58d98bc10
2 changed files with 13 additions and 3 deletions
|
@ -248,6 +248,7 @@ class DownloadUtils(object):
|
|||
##### THE RESPONSE #####
|
||||
log.debug(kwargs)
|
||||
response = self._requests(action_type, session, **kwargs)
|
||||
#response = requests.get('http://httpbin.org/status/400')
|
||||
|
||||
if response.status_code == 204:
|
||||
# No body in the response
|
||||
|
@ -287,6 +288,10 @@ class DownloadUtils(object):
|
|||
|
||||
except requests.exceptions.HTTPError as error:
|
||||
|
||||
if response.status_code == 400:
|
||||
log.error("Malformed request: %s", error)
|
||||
raise Warning('400')
|
||||
|
||||
if response.status_code == 401:
|
||||
# Unauthorized
|
||||
status = window('emby_serverStatus')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue