ory_client_client/models/
generic_error.rs

1/*
2 * Ory APIs
3 *
4 * Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. 
5 *
6 * The version of the OpenAPI document: v0.0.1-alpha.1
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct GenericError {
16    /// The status code
17    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
18    pub code: Option<i64>,
19    /// Debug information  This field is often not exposed to protect against leaking sensitive information.
20    #[serde(rename = "debug", skip_serializing_if = "Option::is_none")]
21    pub debug: Option<String>,
22    /// Further error details
23    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
24    pub details: Option<::std::collections::HashMap<String, serde_json::Value>>,
25    /// Error message  The error's message.
26    #[serde(rename = "message")]
27    pub message: String,
28    /// A human-readable reason for the error
29    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
30    pub reason: Option<String>,
31    /// The request ID  The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
32    #[serde(rename = "request", skip_serializing_if = "Option::is_none")]
33    pub request: Option<String>,
34    /// The status description
35    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
36    pub status: Option<String>,
37}
38
39impl GenericError {
40    pub fn new(message: String) -> GenericError {
41        GenericError {
42            code: None,
43            debug: None,
44            details: None,
45            message,
46            reason: None,
47            request: None,
48            status: None,
49        }
50    }
51}
52
53