pub enum UniError {
Api {
code: String,
message: String,
status: StatusCode,
request_id: Option<String>,
body: Option<Value>,
},
Http {
status: StatusCode,
message: String,
request_id: Option<String>,
body: Option<Value>,
},
Transport(Error),
Configuration(String),
InvalidResponse {
status: StatusCode,
request_id: Option<String>,
message: String,
body: String,
},
}Expand description
Errors produced while configuring the client or calling the API.
Variants§
Api
An API response contained a non-zero business error code.
Fields
§
status: StatusCodeHTTP status of the response.
Http
The server returned a non-successful HTTP status without an API error.
Fields
§
status: StatusCodeNon-successful HTTP status.
Transport(Error)
A transport-level error occurred.
Configuration(String)
The endpoint URL or client configuration was invalid.
InvalidResponse
A response could not be decoded according to the API schema.
Implementations§
Trait Implementations§
Source§impl Error for UniError
impl Error for UniError
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 UniError
impl !UnwindSafe for UniError
impl Freeze for UniError
impl Send for UniError
impl Sync for UniError
impl Unpin for UniError
impl UnsafeUnpin for UniError
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