pub struct ProviderError {
pub status: u16,
pub code: String,
pub description: String,
pub body: String,
pub headers: HeaderMap,
}Expand description
The provider’s answer when a token call fails. code and description
are the RFC 6749 §5.2 error / error_description pair when the body
was JSON; body is the raw response either way, because providers put
provider-specific meaning in that prose — LinkedIn names a dead refresh
token only in the description, never in the code.
Fields§
§status: u16HTTP status the provider answered with.
code: StringThe RFC 6749 §5.2 error code, empty when the body was not JSON.
description: StringThe error_description, empty when the body was not JSON.
body: StringThe response body, verbatim.
headers: HeaderMapThe response headers — Retry-After on a 429, provider trace ids.
Trait Implementations§
Source§impl Debug for ProviderError
impl Debug for ProviderError
Source§impl Display for ProviderError
impl Display for ProviderError
Source§impl Error for ProviderError
impl Error for ProviderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<Box<ProviderError>> for OAuthError
impl From<Box<ProviderError>> for OAuthError
Source§fn from(source: Box<ProviderError>) -> Self
fn from(source: Box<ProviderError>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProviderError
impl RefUnwindSafe for ProviderError
impl Send for ProviderError
impl Sync for ProviderError
impl Unpin for ProviderError
impl UnsafeUnpin for ProviderError
impl UnwindSafe for ProviderError
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