mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 14:14:19 +00:00
Detect invalid token with myplex (#1138)
This commit is contained in:
parent
4946b4bc8b
commit
581a167180
1 changed files with 2 additions and 0 deletions
|
@ -188,6 +188,8 @@ class MyPlexAccount(PlexObject):
|
|||
raise Unauthorized(message)
|
||||
elif response.status_code == 404:
|
||||
raise NotFound(message)
|
||||
elif response.status_code == 422 and "Invalid token" in response.text:
|
||||
raise Unauthorized(message)
|
||||
else:
|
||||
raise BadRequest(message)
|
||||
if headers.get('Accept') == 'application/json':
|
||||
|
|
Loading…
Reference in a new issue