cadrumo.application.auth.errors module¶
Application-level domain errors for the auth surface.
AuthDiagnosticPhoneStateError and AuthDiagnosticPayloadError
specialise core.errors.hierarchy.CoreValidationError for auth diagnostic
validation failures.
- exception AuthDiagnosticPhoneStateError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CoreValidationErrorRaised when an unrecognised phone-state value is supplied to the auth diagnostic recorder.
Replaces the bare
ValueErrorat the validation guard inapplication.auth.diagnostics.record_auth_diagnostic_phone_state()so callers can catch a typed, registry-bound error. Inherits fromcore.errors.hierarchy.CoreValidationError; protocol boundaries translate it to a builtin only where an external validator requires that contract.- Parameters:
- Return type:
None
- code¶
- exception AuthDiagnosticPayloadError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CoreValidationErrorRaised when an encrypted auth diagnostic payload fails structural validation.
Replaces the bare
ValueErrorraises in_payload()(non-object JSON body) andapplication.auth.diagnostics._summary_from_payload()(missingcaptured_atfield). Inherits fromcore.errors.hierarchy.CoreValidationError; callers catch the canonical registered type rather than relying on builtin ancestry.- Parameters:
- Return type:
None
- code¶