pub enum Auth0Error {
Transport(Error),
InvalidRequest(String),
Unauthorized(String),
Forbidden(String),
Conflict {
status: u16,
body: String,
},
TooManyRequests(String),
UnexpectedResponse {
status: u16,
body: String,
},
}Expand description
High‑level errors returned by the Auth0 helpers.
Variants§
Transport(Error)
Low‑level transport / JSON errors.
InvalidRequest(String)
400 – The request parameters are invalid.
401 – Any authentication failure (invalid token, not global, bad JWT sig …).
Forbidden(String)
403 – Caller authenticated but lacks required scopes.
Conflict
TooManyRequests(String)
429 – Too many requests (rate limited).
UnexpectedResponse
Any other non‑success HTTP status.
Implementations§
Source§impl Auth0Error
impl Auth0Error
Sourcepub async fn from_response(resp: Response) -> Self
pub async fn from_response(resp: Response) -> Self
Convert an HTTP response into Auth0Error if it isn’t a success.
Trait Implementations§
Source§impl Debug for Auth0Error
impl Debug for Auth0Error
Source§impl Display for Auth0Error
impl Display for Auth0Error
Source§impl Error for Auth0Error
impl Error for Auth0Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Auth0Error
impl !UnwindSafe for Auth0Error
impl Freeze for Auth0Error
impl Send for Auth0Error
impl Sync for Auth0Error
impl Unpin for Auth0Error
impl UnsafeUnpin for Auth0Error
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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.