Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e19e1921e5 | |||
| 94d011e729 |
@ -70,7 +70,7 @@ pub struct ErrorDetails {
|
|||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub cause: Option<String>,
|
pub cause: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub context: Option<Vec<String>>,
|
pub context: Option<Value>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub schema: Option<String>,
|
pub schema: Option<String>,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ impl Merger {
|
|||||||
pub fn merge(&self, data: Value) -> crate::drop::Drop {
|
pub fn merge(&self, data: Value) -> crate::drop::Drop {
|
||||||
let mut notifications_queue = Vec::new();
|
let mut notifications_queue = Vec::new();
|
||||||
|
|
||||||
let result = self.merge_internal(data, &mut notifications_queue);
|
let result = self.merge_internal(data.clone(), &mut notifications_queue);
|
||||||
|
|
||||||
let val_resolved = match result {
|
let val_resolved = match result {
|
||||||
Ok(val) => val,
|
Ok(val) => val,
|
||||||
@ -34,7 +34,7 @@ impl Merger {
|
|||||||
details: crate::drop::ErrorDetails {
|
details: crate::drop::ErrorDetails {
|
||||||
path: "".to_string(),
|
path: "".to_string(),
|
||||||
cause: None,
|
cause: None,
|
||||||
context: None,
|
context: Some(data),
|
||||||
schema: None,
|
schema: None,
|
||||||
},
|
},
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ impl Queryer {
|
|||||||
details: crate::drop::ErrorDetails {
|
details: crate::drop::ErrorDetails {
|
||||||
path: "".to_string(), // filters apply to the root query
|
path: "".to_string(), // filters apply to the root query
|
||||||
cause: Some(msg),
|
cause: Some(msg),
|
||||||
context: filters.map(|f| vec![f.to_string()]),
|
context: filters.cloned(),
|
||||||
schema: Some(schema_id.to_string()),
|
schema: Some(schema_id.to_string()),
|
||||||
},
|
},
|
||||||
}]);
|
}]);
|
||||||
@ -144,7 +144,7 @@ impl Queryer {
|
|||||||
details: crate::drop::ErrorDetails {
|
details: crate::drop::ErrorDetails {
|
||||||
path: "".to_string(),
|
path: "".to_string(),
|
||||||
cause: Some(format!("Expected array, got {}", other)),
|
cause: Some(format!("Expected array, got {}", other)),
|
||||||
context: Some(vec![sql.to_string()]),
|
context: Some(serde_json::json!([sql])),
|
||||||
schema: Some(schema_id.to_string()),
|
schema: Some(schema_id.to_string()),
|
||||||
},
|
},
|
||||||
}]),
|
}]),
|
||||||
@ -154,7 +154,7 @@ impl Queryer {
|
|||||||
details: crate::drop::ErrorDetails {
|
details: crate::drop::ErrorDetails {
|
||||||
path: "".to_string(),
|
path: "".to_string(),
|
||||||
cause: Some(format!("SPI error in queryer: {}", e)),
|
cause: Some(format!("SPI error in queryer: {}", e)),
|
||||||
context: Some(vec![sql.to_string()]),
|
context: Some(serde_json::json!([sql])),
|
||||||
schema: Some(schema_id.to_string()),
|
schema: Some(schema_id.to_string()),
|
||||||
},
|
},
|
||||||
}]),
|
}]),
|
||||||
|
|||||||
Reference in New Issue
Block a user