mssql_auth/
error.rs

1//! Authentication error types.
2
3use thiserror::Error;
4
5/// Errors that can occur during authentication.
6#[derive(Debug, Error)]
7pub enum AuthError {
8    /// Invalid credentials provided.
9    #[error("invalid credentials: {0}")]
10    InvalidCredentials(String),
11
12    /// Authentication failed on server.
13    #[error("authentication failed: {0}")]
14    AuthenticationFailed(String),
15
16    /// Token expired or invalid.
17    #[error("token expired or invalid")]
18    TokenExpired,
19
20    /// Token acquisition failed.
21    #[error("failed to acquire token: {0}")]
22    TokenAcquisition(String),
23
24    /// Unsupported authentication method.
25    #[error("unsupported authentication method: {0}")]
26    UnsupportedMethod(String),
27
28    /// SSPI/GSSAPI error.
29    #[error("SSPI error: {0}")]
30    Sspi(String),
31
32    /// Certificate error.
33    #[error("certificate error: {0}")]
34    Certificate(String),
35
36    /// Network error during authentication.
37    #[error("network error: {0}")]
38    Network(String),
39
40    /// Configuration error.
41    #[error("configuration error: {0}")]
42    Configuration(String),
43
44    /// Azure identity error.
45    #[error("Azure identity error: {0}")]
46    AzureIdentity(String),
47}