#[non_exhaustive]pub struct ApiError {
pub status: u16,
pub code: String,
pub message: String,
pub hint: Option<String>,
pub details: Option<Value>,
pub request_id: Option<String>,
pub retry_after_seconds: Option<u64>,
}Expand description
The Commit API’s error envelope plus transport metadata.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status: u16HTTP status code.
code: StringStable machine-readable code, e.g. validation_failed, silicon_not_reachable.
message: StringWhat went wrong and why.
hint: Option<String>What to do next, when the service gave one.
details: Option<Value>Structured details the service marks safe to show (field errors, limits).
request_id: Option<String>The request id (X-Request-Id or error.request_id).
retry_after_seconds: Option<u64>Seconds to wait before retrying (Retry-After).
Implementations§
Trait Implementations§
impl StructuralPartialEq for ApiError
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl UnwindSafe 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