pub struct Error {
pub category: Option<String>,
pub domain: Option<String>,
pub error_id: Option<i32>,
pub input_ref_ids: Option<Vec<String>>,
pub long_message: Option<String>,
pub message: Option<String>,
pub output_ref_ids: Option<Vec<String>>,
pub parameters: Option<Vec<ErrorParameter>>,
pub subdomain: Option<String>,
}Expand description
Error : A container that defines the elements of error and warning message.
Fields§
§category: Option<String>The category type for this error or warning. It takes a string that can have one of three values:
Application: Indicates an exception or error occurred in the application code or at runtime. Examples include catching an exception in a service’s business logic, system failures, or request errors from a dependency.Business: Used when your service or a dependent service refused to continue processing on the resource because of a business rule violation such as "Seller does not ship item to Antarctica" or "Buyer ineligible to purchase an alcoholic item". Business errors are not syntactical input errors.Request: Used when there is anything wrong with the request, such as authentication, syntactical errors, rate limiting or missing headers, bad HTTP header values, and so on.
domain: Option<String>Name of the domain containing the service or application.
error_id: Option<i32>A positive integer that uniquely identifies the specific error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.
input_ref_ids: Option<Vec<String>>Identifies specific request elements associated with the error, if any. inputRefId’s response is format specific. For JSON, use JSONPath notation.
long_message: Option<String>An expanded version of message that should be around 100-200 characters long, but is not required to be such.
message: Option<String>An end user and app-developer friendly device agnostic message. It explains what the error or warning is, and how to fix it (in a general sense). Its value is at most 50 characters long. If applicable, the value is localized in the end user’s requested locale.
output_ref_ids: Option<Vec<String>>Identifies specific response elements associated with the error, if any. Path format is the same as inputRefId.
parameters: Option<Vec<ErrorParameter>>This optional complex field type contains a list of one or more context-specific ErrorParameter objects, with each item in the list entry being a parameter (or input field name) that caused an error condition. Each ErrorParameter object consists of two fields, a name and a value.
subdomain: Option<String>Name of the domain’s subsystem or subdivision. For example, checkout is a subdomain in the buying domain.