pub struct ErrorResponse {
pub error: ErrorResponseError,
}
Expand description
An error response from the API. More info here
JSON schema
{
"description": "An error response from the API. More info [here]('/docs/api-reference/errors')",
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"description": "A human-readable message providing more details about the error.",
"examples": [
"Parameter error."
],
"type": "string"
},
"params": {
"description": "The specific request parameters associated with the error. May be omitted if the error message is generic enough to apply to multiple parameters.",
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"description": "A human-readable message providing more details about the error.",
"examples": [
"Name is required."
],
"type": "string"
},
"param": {
"description": "The parameter related to the error.",
"examples": [
"name"
],
"type": "string"
}
}
}
},
"type": {
"description": "The type of error returned.",
"default": "invalid_request_error",
"type": "string",
"enum": [
"invalid_request_error",
"not_found_error",
"creation_error",
"update_error",
"deletion_error",
"forbidden_error",
"authentication_error",
"conflict_error"
]
}
}
}
}
}
Fields§
§error: ErrorResponseError
Implementations§
Source§impl ErrorResponse
impl ErrorResponse
pub fn builder() -> ErrorResponse
Trait Implementations§
Source§impl Clone for ErrorResponse
impl Clone for ErrorResponse
Source§fn clone(&self) -> ErrorResponse
fn clone(&self) -> ErrorResponse
Returns a copy of the value. Read more
1.0.0 · 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 ErrorResponse
impl Debug for ErrorResponse
Source§impl<'de> Deserialize<'de> for ErrorResponse
impl<'de> Deserialize<'de> for ErrorResponse
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
Source§impl From<&ErrorResponse> for ErrorResponse
impl From<&ErrorResponse> for ErrorResponse
Source§fn from(value: &ErrorResponse) -> Self
fn from(value: &ErrorResponse) -> Self
Converts to this type from the input type.
Source§impl From<ErrorResponse> for ErrorResponse
impl From<ErrorResponse> for ErrorResponse
Source§fn from(value: ErrorResponse) -> Self
fn from(value: ErrorResponse) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for ErrorResponse
impl JsonSchema for ErrorResponse
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl Serialize for ErrorResponse
impl Serialize for ErrorResponse
Source§impl TryFrom<ErrorResponse> for ErrorResponse
impl TryFrom<ErrorResponse> for ErrorResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: ErrorResponse) -> Result<Self, ConversionError>
fn try_from(value: ErrorResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ErrorResponse
impl RefUnwindSafe for ErrorResponse
impl Send for ErrorResponse
impl Sync for ErrorResponse
impl Unpin for ErrorResponse
impl UnwindSafe for ErrorResponse
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