elasticsearch_dsl/search/response/
error_cause.rs

1use crate::{util::ShouldSkip, Map};
2use serde_json::Value;
3
4/// Error cause
5#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
6pub struct ErrorCause {
7    /// Deeper error cause
8    pub caused_by: Option<Box<ErrorCause>>,
9
10    /// Error cause reason
11    pub reason: Option<String>,
12
13    /// Root error cause
14    #[serde(skip_serializing_if = "ShouldSkip::should_skip", default)]
15    pub root_cause: Vec<ErrorCause>,
16
17    /// Exception stack trace
18    pub stack_trace: Option<String>,
19
20    /// Suppressed error causes
21    #[serde(skip_serializing_if = "ShouldSkip::should_skip", default)]
22    pub suppressed: Vec<ErrorCause>,
23
24    /// Type of error cause
25    #[serde(rename = "type")]
26    pub ty: Option<String>,
27
28    /// Additional fields that are not part of the strongly typed error cause
29    #[serde(skip_serializing_if = "ShouldSkip::should_skip", default, flatten)]
30    pub additional_details: Map<String, Value>,
31}