Remove error flattening in task serialization
@@ -97,8 +97,7 @@ pub struct FailedUpdateResult {
pub update_id: u64,
#[serde(rename = "type")]
pub update_type: UpdateType,
- #[serde(flatten)]
- pub response: ResponseError,
+ pub error: ResponseError,
pub duration: f64, // in seconds
pub enqueued_at: DateTime<Utc>,
pub processed_at: DateTime<Utc>,
@@ -190,12 +189,12 @@ impl From<UpdateStatus> for UpdateStatusResponse {
let update_id = failed.id();
let processed_at = failed.failed_at;
let enqueued_at = failed.from.from.enqueued_at;
- let response = failed.into();
+ let error = failed.into();
let content = FailedUpdateResult {
update_id,
update_type,
- response,
+ error,
duration,
enqueued_at,
processed_at,
