pub struct ApiErrorContext {
pub status: StatusCode,
pub api_code: Option<i64>,
pub message: String,
pub request_id: Option<String>,
pub metadata: Option<Value>,
pub kind: ApiErrorKind,
}Expand description
Normalized API error payload used across all endpoint modules.
Fields§
§status: StatusCode§api_code: Option<i64>§message: String§request_id: Option<String>§metadata: Option<Value>§kind: ApiErrorKindImplementations§
Source§impl ApiErrorContext
impl ApiErrorContext
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if the request is typically retryable.
pub fn is_client_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Trait Implementations§
Source§impl Clone for ApiErrorContext
impl Clone for ApiErrorContext
Source§fn clone(&self) -> ApiErrorContext
fn clone(&self) -> ApiErrorContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiErrorContext
impl Debug for ApiErrorContext
Auto Trait Implementations§
impl Freeze for ApiErrorContext
impl RefUnwindSafe for ApiErrorContext
impl Send for ApiErrorContext
impl Sync for ApiErrorContext
impl Unpin for ApiErrorContext
impl UnsafeUnpin for ApiErrorContext
impl UnwindSafe for ApiErrorContext
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