clerk_rs/models/
clerk_error.rs1#[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}