pub struct ApiErrorResponse {
pub code: ApiErrorCode,
pub error: String,
}Expand description
Standard error response envelope for all 4xx/5xx responses.
Every non-2xx response from the API has this shape. The code
is a short, stable token from a closed enum suitable for
programmatic dispatch; the error is a human-readable message
suitable for log/UI display.
JSON schema
{
"description": "Standard error response envelope for all 4xx/5xx responses.\n\nEvery non-2xx response from the API has this shape. The `code`\nis a short, stable token from a closed enum suitable for\nprogrammatic dispatch; the `error` is a human-readable message\nsuitable for log/UI display.",
"type": "object",
"required": [
"code",
"error"
],
"properties": {
"code": {
"$ref": "#/components/schemas/ApiErrorCode"
},
"error": {
"description": "Human-readable error message. Suitable for log/UI display; do\nnot parse for branching.",
"type": "string"
}
}
}Fields§
§code: ApiErrorCode§error: StringHuman-readable error message. Suitable for log/UI display; do not parse for branching.
Trait Implementations§
Source§impl Clone for ApiErrorResponse
impl Clone for ApiErrorResponse
Source§fn clone(&self) -> ApiErrorResponse
fn clone(&self) -> ApiErrorResponse
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 ApiErrorResponse
impl Debug for ApiErrorResponse
Source§impl<'de> Deserialize<'de> for ApiErrorResponse
impl<'de> Deserialize<'de> for ApiErrorResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ApiErrorResponse
impl RefUnwindSafe for ApiErrorResponse
impl Send for ApiErrorResponse
impl Sync for ApiErrorResponse
impl Unpin for ApiErrorResponse
impl UnsafeUnpin for ApiErrorResponse
impl UnwindSafe for ApiErrorResponse
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