clerk_rs/models/
clerk_error.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct ClerkError {
13	#[serde(rename = "message")]
14	pub message: String,
15	#[serde(rename = "long_message")]
16	pub long_message: String,
17	#[serde(rename = "code")]
18	pub code: String,
19	#[serde(rename = "meta", skip_serializing_if = "Option::is_none")]
20	pub meta: Option<serde_json::Value>,
21	#[serde(rename = "clerk_trace_id", skip_serializing_if = "Option::is_none")]
22	pub clerk_trace_id: Option<String>,
23}
24
25impl ClerkError {
26	pub fn new(message: String, long_message: String, code: String) -> ClerkError {
27		ClerkError {
28			message,
29			long_message,
30			code,
31			meta: None,
32			clerk_trace_id: None,
33		}
34	}
35}