mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 14:54:27 +01:00
Remove error flattening in task serialization
This commit is contained in:
parent
3c696da274
commit
6bbc1b4316
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user