Skip to content

nautobot.apps.exceptions

Exceptions for Nautobot apps.

nautobot.apps.exceptions.AbortTransaction

Bases: Exception

An exception used to trigger a database transaction rollback.

nautobot.apps.exceptions.CeleryWorkerNotRunningException

Bases: APIException

Indicates the temporary inability to enqueue a new Celery task (e.g. custom script execution) because no Celery worker processes are currently running.

nautobot.apps.exceptions.ConfigurationError

Bases: Exception

Deprecated - no longer used in Nautobot core.

nautobot.apps.exceptions.FilterSetFieldNotFound

Bases: Exception

An exception indicating that a filterset field could not be found.

nautobot.apps.exceptions.SecretError

Bases: Exception

General purpose exception class for failures raised when secret value access fails.

nautobot.apps.exceptions.SecretParametersError

Bases: SecretError

Exception raised when a Secret record's parameters are incorrectly specified.

Normally this should be caught during input validation of the Secret record, but in the case of direct ORM access bypassing the usual clean() functionality, it's possible to create a mis-defined Secret which would trigger this exception upon access.

nautobot.apps.exceptions.SecretProviderError

Bases: SecretError

General purpose exception class for failures that indicate that a secrets provider is not working correctly.

nautobot.apps.exceptions.SecretValueNotFoundError

Bases: SecretError, KeyError

Exception raised when a secrets provider is operating normally but a specific requested secret is not found.

nautobot.apps.exceptions.SensitiveFieldError

Bases: FieldError

An exception indicating that a field listed in Model.sensitive_fields was retrieved without opting in.

Deliberately derives from FieldError and not from AttributeError: an AttributeError would make hasattr(obj, field_name) return False and getattr(obj, field_name, "") return the default, so generic code and Django templates would silently render nothing instead of surfacing that a value was withheld. FieldError is also the family Django raises for an unusable field reference in a query, so callers that already handle user-supplied field names degrade to a skipped column or a 400 rather than a 500.