Continuing with error refactoring.

This commit is contained in:
2026-10-10 20:50:43 +02:00
parent d6bb67721e
commit 731139045d
18 changed files with 359 additions and 103 deletions
+28
View File
@@ -1,5 +1,33 @@
use axum::response::IntoResponse;
use crate::error::AppError;
pub mod auth;
pub mod form;
pub mod json;
pub mod path;
pub mod query;
#[derive(Debug, thiserror::Error)]
pub enum ExtractorError {
#[error(transparent)]
Authorization(#[from] auth::AuthError),
#[error(transparent)]
Form(#[from] form::FormError),
#[error(transparent)]
Json(#[from] json::JsonError),
#[error(transparent)]
Path(#[from] path::PathError),
#[error(transparent)]
Query(#[from] query::QueryError),
}
impl IntoResponse for ExtractorError {
fn into_response(self) -> axum::response::Response {
AppError::from(self).into_response()
}
}