diff --git a/crates/warehouse/src/handler/post_generate_aggregation.rs b/crates/warehouse/src/handler/post_generate_aggregation.rs index 552c2cd..6ca8089 100644 --- a/crates/warehouse/src/handler/post_generate_aggregation.rs +++ b/crates/warehouse/src/handler/post_generate_aggregation.rs @@ -16,9 +16,9 @@ impl From for PostGenerateAggregationError { } impl std::fmt::Display for PostGenerateAggregationError { - fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - _ => todo!(), + _ => write!(f, "{self}"), } } } @@ -30,7 +30,6 @@ impl IntoResponse for PostGenerateAggregationError { } } -#[axum::debug_handler] pub async fn run( State(env): State>, Json(payload): Json>, @@ -47,7 +46,8 @@ pub async fn run( env.currency_exchange_db_path.clone(), job_ids, ) - .await?; + .await + .inspect_err(|e| tracing::error!("failed to generate job tags. reason: {e}"))?; } model::warehouse::GenerateAggregation::JobsTags { job_ids } => { tracing::info!("Generating JobsTags..."); @@ -57,7 +57,8 @@ pub async fn run( env.currency_exchange_db_path.clone(), job_ids, ) - .await?; + .await + .inspect_err(|e| tracing::error!("failed to generate job tags. reason: {e}"))?; }, } }