pub struct Error { /* private fields */ }
Expand description
The Errors that may occur when using Modio
.
Implementations§
source§impl Error
impl Error
sourcepub fn is_auth(&self) -> bool
pub fn is_auth(&self) -> bool
Returns true if the API key/access token is incorrect, revoked, expired or the request needs a different authentication method.
sourcepub fn is_terms_acceptance_required(&self) -> bool
pub fn is_terms_acceptance_required(&self) -> bool
Returns true if the acceptance of the Terms of Use is required before continuing external authorization.
sourcepub fn is_builder(&self) -> bool
pub fn is_builder(&self) -> bool
Returns true if the error is from a type Builder.
sourcepub fn is_download(&self) -> bool
pub fn is_download(&self) -> bool
Returns true if the error is from a DownloadAction
.
sourcepub fn is_ratelimited(&self) -> bool
pub fn is_ratelimited(&self) -> bool
Returns true if the rate limit associated with credentials has been exhausted.
sourcepub fn is_response(&self) -> bool
pub fn is_response(&self) -> bool
Returns true if the error was generated from a response.
sourcepub fn is_validation(&self) -> bool
pub fn is_validation(&self) -> bool
Returns true if the error contains validation errors.
sourcepub fn api_error(&self) -> Option<&ApiError>
pub fn api_error(&self) -> Option<&ApiError>
Returns the API error if the error was generated from a response.
sourcepub fn error_ref(&self) -> Option<u16>
pub fn error_ref(&self) -> Option<u16>
Returns modio’s error reference code.
See the Error Codes docs for more information.
sourcepub fn status(&self) -> Option<StatusCode>
pub fn status(&self) -> Option<StatusCode>
Returns status code if the error was generated from a response.