Skip to content

Exceptions

All Saffier custom exceptions derive from the base SaffierException.

ObjectNotFound

Raised when querying a model instance and it does not exist.

from saffier.exceptions import ObjectNotFound

Or simply:

from saffier import ObjectNotFound

MultipleObjectsReturned

Raised when querying a model and returns multiple results for the given query result.

from saffier.exceptions import MultipleObjectsReturned

Or simply:

from saffier import MultipleObjectsReturned

ValidationError

Raised when a validation error is thrown.

from saffier.exceptions import ValidationError

Or simply:

from saffier import ValidationError

ImproperlyConfigured

Raised when misconfiguration in the models and metaclass is passed.

from saffier.exceptions import ImproperlyConfigured

Or simply:

from saffier import ImproperlyConfigured