merger payload issue when errors

This commit is contained in:
2026-03-18 05:03:35 -04:00
parent 263cf04ffb
commit 94d011e729
3 changed files with 6 additions and 6 deletions

View File

@ -70,7 +70,7 @@ pub struct ErrorDetails {
#[serde(skip_serializing_if = "Option::is_none")]
pub cause: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub context: Option<Vec<String>>,
pub context: Option<Value>,
#[serde(skip_serializing_if = "Option::is_none")]
pub schema: Option<String>,
}

View File

@ -23,7 +23,7 @@ impl Merger {
pub fn merge(&self, data: Value) -> crate::drop::Drop {
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 {
Ok(val) => val,
@ -34,7 +34,7 @@ impl Merger {
details: crate::drop::ErrorDetails {
path: "".to_string(),
cause: None,
context: None,
context: Some(data),
schema: None,
},
}]);

View File

@ -36,7 +36,7 @@ impl Queryer {
details: crate::drop::ErrorDetails {
path: "".to_string(), // filters apply to the root query
cause: Some(msg),
context: filters.map(|f| vec![f.to_string()]),
context: filters.cloned(),
schema: Some(schema_id.to_string()),
},
}]);
@ -144,7 +144,7 @@ impl Queryer {
details: crate::drop::ErrorDetails {
path: "".to_string(),
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()),
},
}]),
@ -154,7 +154,7 @@ impl Queryer {
details: crate::drop::ErrorDetails {
path: "".to_string(),
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()),
},
}]),