1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use crate::{util::ShouldSkip, Map};
use serde_json::Value;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ErrorCause {
pub caused_by: Option<Box<ErrorCause>>,
pub reason: Option<String>,
#[serde(skip_serializing_if = "ShouldSkip::should_skip", default)]
pub root_cause: Vec<ErrorCause>,
pub stack_trace: Option<String>,
#[serde(skip_serializing_if = "ShouldSkip::should_skip", default)]
pub suppressed: Vec<ErrorCause>,
#[serde(rename = "type")]
pub ty: Option<String>,
#[serde(skip_serializing_if = "ShouldSkip::should_skip", default, flatten)]
pub additional_details: Map<String, Value>,
}