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