Enum spotify_rs::Error
source · pub enum Error {
Authentication {
kind: Kind,
description: String,
},
ExpiredToken,
Http(String),
InvalidStateParameter,
NotAuthenticated,
RefreshUnavailable,
Spotify {
status: u16,
message: String,
},
}Expand description
An error returned by the client in a custom Result.
Variants§
Authentication
Error that occured during authentication.
ExpiredToken
The token has expired and auto-refresh is turned off.
Http(String)
HTTP error returned from the underlying HTTP client.
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.
NotAuthenticated
The client has not yet been authenticated.
The access token has expired and refreshing it is not possible in the current authorisation flow.
Spotify
An error returned from Spotify.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<RequestTokenError<Error<Error>, StandardErrorResponse<BasicErrorResponseType>>> for Error
impl From<RequestTokenError<Error<Error>, StandardErrorResponse<BasicErrorResponseType>>> for Error
source§fn from(
value: RequestTokenError<Error<Error>, StandardErrorResponse<BasicErrorResponseType>>
) -> Self
fn from( value: RequestTokenError<Error<Error>, StandardErrorResponse<BasicErrorResponseType>> ) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more