Source code for aiosnow.exceptions
[docs]class AiosnowException(Exception):
pass
[docs]class ConfigurationError(AiosnowException):
"""Configuration error"""
[docs]class AmbiguousClientAuthentication(AiosnowException):
"""Multiple authentication methods provided"""
[docs]class MissingClientAuthentication(AiosnowException):
"""No authentication method provided"""
[docs]class UnexpectedContentType(AiosnowException):
"""Unexpected content type from server"""
[docs]class ClientConnectionError(AiosnowException):
"""Raised when there was a problem connecting to the server"""
[docs]class SerializationError(AiosnowException):
"""Raised when there was an issue with serialization"""
[docs]class DeserializationError(AiosnowException):
"""Raised when there was an issue with deserialization"""
[docs]class RequestError(AiosnowException):
"""The application returned a parsable error in the response"""
def __init__(self, message: str, status: int):
self.message = message
self.status = status
[docs]class ErrorResponse(RequestError):
"""The server returned an error in the response"""
[docs]class UnexpectedResponseContent(RequestError):
"""Unexpected content in response from server"""
[docs]class UnexpectedPayloadType(AiosnowException):
"""Raised when the request payload was of an unexpected type"""
[docs]class PayloadValidationError(AiosnowException):
"""Local payload validation against a Resource Schema failed"""
[docs]class IncompatiblePayloadField(AiosnowException):
"""An incompatible field was found in the payload"""
[docs]class UnknownPayloadField(AiosnowException):
"""A field unknown to the schema was found in the payload"""
[docs]class UnexpectedValue(AiosnowException):
"""Typically raised when a method receives unexpected input"""
[docs]class SchemaError(AiosnowException):
"""Generic exception raised on schema issues, e.g. integrity errors"""
[docs]class SelectError(AiosnowException):
"""Raised on query builder issues"""
[docs]class InvalidContentMethod(AiosnowException):
"""Raised if the response content was incorrectly accessed"""
[docs]class InvalidFieldName(AiosnowException):
"""Usually raised if an attempt is made to override a base member with a Field"""
[docs]class TooManyItems(AiosnowException):
"""The request yielded too many results"""
[docs]class NoItems(AiosnowException):
"""The request yielded no results"""
[docs]class DeleteError(AiosnowException):
"""Raised if there was an error deleting a record"""