Skip to main content

AuthsErrorInfo

Trait AuthsErrorInfo 

Source
pub trait AuthsErrorInfo {
    // Required methods
    fn error_code(&self) -> &'static str;
    fn suggestion(&self) -> Option<&'static str>;
}
Expand description

Trait for error metadata providing structured error codes and actionable suggestions.

All Auths error types implement this trait to provide:

  • A unique error code for programmatic handling (e.g., “AUTHS_VERIFICATION_ERROR”)
  • An optional human-readable suggestion for how to resolve the error

Required Methods§

Source

fn error_code(&self) -> &'static str

Returns a unique error code string following the AUTHS_* naming convention.

Source

fn suggestion(&self) -> Option<&'static str>

Returns an optional actionable suggestion for resolving the error.

Implementors§