pub struct ErrorResponse {
pub error: Option<String>,
pub code: Option<i32>,
pub type: Option<String>,
pub detail: Option<String>,
pub instance: Option<String>,
}
Expand description
ErrorResponse : Common JSON error response model
Fields§
§error: Option<String>
a brief, human-readable message about the error
code: Option<i32>
HTTP style response code, where 4XX represents client side errors and 5XX represents server side errors. For implementations that uses HTTP (e.g. REST namespace), this field can be optional in favor of the HTTP response status code. In case both values exist and do not match, the HTTP response status code should be used.
type: Option<String>
An optional type identifier string for the error. This allows the implementation to specify their internal error type, which could be more detailed than the HTTP standard status code.
detail: Option<String>
an optional human-readable explanation of the error. This can be used to record information such as stack trace.
instance: Option<String>
a string that identifies the specific occurrence of the error. This can be a URI, a request or response ID, or anything that the implementation can recognize to trace specific occurrence of the error.
Implementations§
Source§impl ErrorResponse
impl ErrorResponse
Sourcepub fn new() -> ErrorResponse
pub fn new() -> ErrorResponse
Common JSON error response model
Trait Implementations§
Source§impl Clone for ErrorResponse
impl Clone for ErrorResponse
Source§fn clone(&self) -> ErrorResponse
fn clone(&self) -> ErrorResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more