/pyfcm/errors.py
https://github.com/olucurious/PyFCM · Python · 48 lines · 13 code · 9 blank · 26 comment · 0 complexity · aa3a3f64d7d8ed53409fe2f417a8af18 MD5 · raw file
- class FCMError(Exception):
- """
- PyFCM Error
- """
- pass
- class AuthenticationError(FCMError):
- """
- API key not found or there was an error authenticating the sender
- """
- pass
- class FCMNotRegisteredError(FCMError):
- """
- push token is not registered
- https://firebase.google.com/docs/reference/fcm/rest/v1/ErrorCode
- """
- pass
- class FCMServerError(FCMError):
- """
- Internal server error or timeout error on Firebase cloud messaging server
- """
- pass
- class InvalidDataError(FCMError):
- """
- Invalid input
- """
- pass
- class InternalPackageError(FCMError):
- """
- JSON parsing error, please create a new github issue describing what you're doing
- """
- pass
- class RetryAfterException(Exception):
- """
- Retry-After must be handled by external logic.
- """
- def __init__(self, delay):
- self.delay = delay