python-plexapi/plexapi/exceptions.py

37 lines
683 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2014-12-29 03:21:58 +00:00
2017-02-20 05:37:00 +00:00
class PlexApiException(Exception):
""" Base class for all PlexAPI exceptions. """
2014-12-29 03:21:58 +00:00
pass
2017-02-20 05:37:00 +00:00
class BadRequest(PlexApiException):
""" An invalid request, generally a user error. """
2014-12-29 03:21:58 +00:00
pass
2017-02-20 05:37:00 +00:00
class NotFound(PlexApiException):
""" Request media item or device is not found. """
2014-12-29 03:21:58 +00:00
pass
2017-02-20 05:37:00 +00:00
class UnknownType(PlexApiException):
""" Unknown library type. """
2014-12-29 03:21:58 +00:00
pass
2015-02-24 03:42:29 +00:00
2017-02-20 05:37:00 +00:00
class Unsupported(PlexApiException):
""" Unsupported client request. """
pass
2017-02-20 05:37:00 +00:00
class Unauthorized(BadRequest):
""" Invalid username/password or token. """
2015-02-24 03:42:29 +00:00
pass
class TwoFactorRequired(Unauthorized):
""" Two factor authentication required. """
pass