feat: refactored error handling

This commit is contained in:
Per Stark
2025-01-01 23:26:41 +01:00
parent 796bbc0225
commit 519f6c6eb1
25 changed files with 439 additions and 293 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
use crate::{
error::ApiError,
error::{ApiError, AppError},
ingress::types::ingress_input::{create_ingress_objects, IngressInput},
server::AppState,
storage::types::user::User,
@@ -22,7 +22,7 @@ pub async fn ingress_handler(
.map(|object| state.rabbitmq_producer.publish(object))
.collect();
try_join_all(futures).await?;
try_join_all(futures).await.map_err(AppError::from)?;
Ok(StatusCode::OK)
}