pub enum OAuthError {
AuthCodeBadUri {
uri: String,
e: ParseError,
},
AuthCodeNotFound {
uri: String,
},
AuthCodeStdinRead,
AuthCodeListenerBind {
addr: SocketAddr,
e: Error,
},
AuthCodeListenerTerminated,
AuthCodeListenerRead,
AuthCodeListenerParse,
AuthCodeListenerWrite,
InvalidSpotifyUri,
InvalidRedirectUri {
uri: String,
e: ParseError,
},
Recv,
ExchangeCode {
e: String,
},
}
Expand description
Possible errors encountered during the OAuth authentication flow.
Variants§
AuthCodeBadUri
The redirect URI cannot be parsed as a valid URL.
AuthCodeNotFound
The authorization code parameter is missing in the redirect URI.
AuthCodeStdinRead
Failed to read input from standard input when manually collecting auth code.
AuthCodeListenerBind
Could not bind TCP listener to the specified socket address for OAuth callback.
AuthCodeListenerTerminated
Listener terminated before receiving an OAuth callback connection.
AuthCodeListenerRead
Failed to read incoming HTTP request containing OAuth callback.
AuthCodeListenerParse
Received malformed HTTP request for OAuth callback.
AuthCodeListenerWrite
Could not send HTTP response after handling OAuth callback.
InvalidSpotifyUri
Invalid Spotify authorization endpoint URL.
InvalidRedirectUri
Redirect URI failed validation.
Recv
Channel communication failure.
ExchangeCode
Token exchange failure with Spotify’s authorization server.
Trait Implementations§
Source§impl Debug for OAuthError
impl Debug for OAuthError
Source§impl Display for OAuthError
impl Display for OAuthError
Source§impl Error for OAuthError
impl Error for OAuthError
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for OAuthError
impl !RefUnwindSafe for OAuthError
impl Send for OAuthError
impl Sync for OAuthError
impl Unpin for OAuthError
impl !UnwindSafe for OAuthError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.