Errors¶
Custom error classes used in the application.
-
exception
fleetingform.errors.
FleetingAuthOTPError
(user, auth_type, *args, **kwargs)[source]¶ Raised when creating, saving, or sending a one time passcode fails.
- Parameters
user (
fleetingform.models.FleetingUser
) – User the OTP was being generated for.auth_type (str from FleetingAuth.AUTH_TYPES) – Authentication type of the form.
-
exception
fleetingform.errors.
FleetingDeletionError
(klass, pk, *args, **kwargs)[source]¶ Raised when you try to delete an object that cannot be deleted.
- Parameters
klass (str) – object class
pk (object) – object primary key
-
exception
fleetingform.errors.
FleetingFormCompleteError
(code, *args, **kwargs)[source]¶ Raised when an attempt is made to save a form that is already complete.
- Parameters
code (str) – The form’s one time code.
-
exception
fleetingform.errors.
FleetingFormGenerationError
[source]¶ Raised when for generation fails.
-
exception
fleetingform.errors.
FleetingOTPRetriesExceeded
(user, *args, **kwargs)[source]¶ Raised when the max number of OTP resends is exceeded.
- Parameters
user (
fleetingform.models.FleetingUser
) – the user for which the retries were exceeded.
-
exception
fleetingform.errors.
FleetingValidationError
(field, code, *args, **kwargs)[source]¶ Raised while validating requests.
Using a message map in place of handwritten Exception messages provides a more consistent user experience when creating forms.
- Parameters
field (str) – the field with the value that failed validation.
code (str) – the code of the form.