Skip to main content

ory_kratos_client/models/
error_generic.rs

1/*
2 * Ory Identities API
3 *
4 * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. 
5 *
6 * The version of the OpenAPI document: v26.2.0
7 * Contact: office@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ErrorGeneric : The standard Ory JSON API error format.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ErrorGeneric {
17    #[serde(rename = "error")]
18    pub error: Box<models::GenericError>,
19}
20
21impl ErrorGeneric {
22    /// The standard Ory JSON API error format.
23    pub fn new(error: models::GenericError) -> ErrorGeneric {
24        ErrorGeneric {
25            error: Box::new(error),
26        }
27    }
28}
29