pub enum AuthError {
Transport(String),
Http {
status: u16,
code: Option<String>,
},
Decode(&'static str),
CodeExpired,
Denied,
SessionInfo(&'static str),
LoginRequired,
Unauthorized,
Store(StoreError),
}Expand description
Errors from the device flow and the Authenticator. No variant ever
carries a token or a server body (AC15).
Variants§
Transport(String)
No HTTP response (connection, timeout, TLS). Transient.
Http
An HTTP status the caller does not handle. code is the OAuth2
error code, kept only when it is one of the known codes. A 5xx
or 429 from a refresh is transient.
Decode(&'static str)
A 2xx body that could not be decoded; names what was being read.
CodeExpired
The device code expired before the user approved it (AC2).
Denied
The user denied the login on the Tidal page (AC2).
SessionInfo(&'static str)
The token response lacks the user ID or country (AC3); names which.
LoginRequired
The session is lost (refresh token rejected): run tidal-player login.
A request was rejected with 401 again right after a refresh (AC5).
Store(StoreError)
The session store failed.
Implementations§
Trait Implementations§
impl Eq for AuthError
Source§impl Error for AuthError
impl Error for AuthError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()