Remove error flattening in task serialization

This commit is contained in:
many 2021-11-04 17:04:06 +01:00
parent 3c696da274
commit 6bbc1b4316
No known key found for this signature in database
GPG Key ID: 2CEF23B75189EACA

View File

@ -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,