pub enum ApiError {
Show 25 variants
BadRequestError {
message: String,
field: Option<String>,
details: Option<String>,
},
ForbiddenError {
message: String,
resource: Option<String>,
required_permission: Option<String>,
},
NotFoundError {
message: String,
resource_id: Option<String>,
resource_type: Option<String>,
},
InternalServerError {
message: String,
error_id: Option<String>,
},
FailedDependencyError {
message: String,
},
TooManyRequestsError {
message: String,
code: Option<String>,
},
TooEarlyError {
message: String,
code: Option<ContactErrorModelCode>,
metadata: Option<HashMap<String, Value>>,
},
ConflictError {
message: String,
code: Option<String>,
},
MethodNotAllowedError {
message: String,
code: Option<String>,
},
UnauthorizedError {
message: String,
auth_type: Option<String>,
},
UnprocessableEntityError {
message: String,
code: Option<String>,
},
PreconditionFailedError {
message: String,
code: Option<String>,
},
ExpectationFailedError {
message: String,
code: Option<String>,
},
PaymentRequiredError {
message: String,
code: Option<String>,
},
UnsupportedMediaTypeError {
message: String,
code: Option<String>,
},
Http {
status: u16,
message: String,
},
Network(Error),
Executor(Box<dyn Error + Send + Sync>),
Serialization(Error),
Configuration(String),
InvalidHeader,
RequestClone,
StreamTerminated,
StreamTimeout,
SseParseError(String),
}Variants§
BadRequestError
ForbiddenError
NotFoundError
InternalServerError
FailedDependencyError
TooManyRequestsError
TooEarlyError
ConflictError
MethodNotAllowedError
Fields
UnprocessableEntityError
PreconditionFailedError
ExpectationFailedError
PaymentRequiredError
UnsupportedMediaTypeError
Http
Network(Error)
Executor(Box<dyn Error + Send + Sync>)
Serialization(Error)
Configuration(String)
InvalidHeader
RequestClone
StreamTerminated
StreamTimeout
SseParseError(String)
Implementations§
Trait Implementations§
Source§impl Error for ApiError
impl Error for ApiError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for ApiError
impl !UnwindSafe for ApiError
impl Forget for ApiError
impl Freeze for ApiError
impl Move for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
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