Handle 404 fallback.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use crate::error::AppError;
|
||||
|
||||
pub mod dtos;
|
||||
pub mod extractors;
|
||||
pub mod scheduled_transactions;
|
||||
@@ -15,5 +17,10 @@ pub fn create_router(pool: sqlx::PgPool) -> axum::Router {
|
||||
)
|
||||
.nest("/transactions", transactions::create_router()),
|
||||
)
|
||||
.fallback(handle_fallback)
|
||||
.with_state(pool)
|
||||
}
|
||||
|
||||
async fn handle_fallback() -> AppError {
|
||||
AppError::NotFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user