pub struct Error {
pub correlation_id: Option<String>,
pub error_link: Option<Url>,
pub error_message: String,
pub error_type: ErrorType,
pub unauthorized_capabilities: Vec<CapabilityName>,
}Expand description
An error response including the code for the type of error and a human-readable message describing the error.
JSON schema
{
"description": "An error response including the code for the type of error and a human-readable message describing the error.",
"examples": [
{
"correlationId": "41deb8d59a9dc9a7-IAD",
"errorLink": "https://docs.cdp.coinbase.com/api-reference/v2/errors#invalid-request",
"errorMessage": "Invalid request.",
"errorType": "invalid_request"
}
],
"type": "object",
"required": [
"errorMessage",
"errorType"
],
"properties": {
"correlationId": {
"description": "A unique identifier for the request that generated the error. This can be used to help debug issues with the API.",
"examples": [
"41deb8d59a9dc9a7-IAD"
],
"type": "string"
},
"errorLink": {
"description": "A link to the corresponding error documentation.",
"examples": [
"https://docs.cdp.coinbase.com/api-reference/v2/errors#invalid-request"
],
"allOf": [
{
"$ref": "#/components/schemas/Url"
}
]
},
"errorMessage": {
"description": "The error message.",
"examples": [
"Unable to create EVM account"
],
"type": "string"
},
"errorType": {
"$ref": "#/components/schemas/ErrorType"
},
"unauthorizedCapabilities": {
"description": "The capability code(s) that were not authorized for the customer on\nthis request. Present only when `errorType` is\n`customer_not_authorized`; absent for every other error type.\n\nUse this list to render onboarding UX for the listed capabilities, or\nfetch `GET /v2/customers/{customerId}` and inspect each entry's\n`status` / `requirements` to discover what (if anything) can be\nsubmitted to resolve the block.\n",
"type": "array",
"items": {
"$ref": "#/components/schemas/CapabilityName"
}
}
}
}Fields§
§correlation_id: Option<String>A unique identifier for the request that generated the error. This can be used to help debug issues with the API.
error_link: Option<Url>A link to the corresponding error documentation.
error_message: StringThe error message.
error_type: ErrorTypeThe capability code(s) that were not authorized for the customer on
this request. Present only when errorType is
customer_not_authorized; absent for every other error type.
Use this list to render onboarding UX for the listed capabilities, or
fetch `GET /v2/customers/{customerId}` and inspect each entry's
`status` / `requirements` to discover what (if anything) can be
submitted to resolve the block.Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
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 Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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