pub enum Error {
NotAuthenticated,
ExpiredToken,
InvalidStateParameter,
RefreshUnavailable,
NoRemainingPages,
InvalidClientState,
InvalidResponse,
Spotify {
status: u16,
description: String,
},
Authentication {
source: RequestTokenError<Error<Error>, StandardErrorResponse<BasicErrorResponseType>>,
},
Parse {
description: String,
},
Deserialization {
source: Error,
body: String,
},
Http {
source: Error,
},
}Variants§
NotAuthenticated
The client has not yet been authenticated.
ExpiredToken
The access token has expired and auto-refresh is turned off.
InvalidStateParameter
The (CSRF) state parameter supplied is not the same as the one initially generated and sent to the server.
Learn more about CSRF here.
The access token has expired and refreshing it is not possible in the current authorisation flow.
NoRemainingPages
InvalidClientState
An error that indicates that an internal error occurred and the client had no PKCE verifier when authenticating.
This error should not occur realistically.
InvalidResponse
The returned data is not valid valid UTF-8.
Spotify
An error returned by Spotify.
Fields
Authentication
Fields
Parse
An error related to parsing items.
Deserialization
An error that resulted from deserializing data, either as a model type,
or as a Nil.
Http
An HTTP error, as returned from the underlying HTTP client.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Error::source. Read more