summaryrefslogtreecommitdiffstats
path: root/src/routes/mod.rs
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-10 10:58:47 +0000
committerSanto Cariotti <santo@dcariotti.me>2022-09-10 10:58:47 +0000
commit22d993b7c076c591cde13105b8f6707433945842 (patch)
tree0f0158c2e59d5fa502a615cf2ae08264f10ee859 /src/routes/mod.rs
parenteb0c91b62ae10cbf8b6c787313855a9efd63f2f0 (diff)
Raise 404 error for not route found
Diffstat (limited to 'src/routes/mod.rs')
-rw-r--r--src/routes/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/routes/mod.rs b/src/routes/mod.rs
index 7e61662..0de7291 100644
--- a/src/routes/mod.rs
+++ b/src/routes/mod.rs
@@ -1,3 +1,10 @@
pub mod auth;
pub mod model;
pub mod user;
+
+use crate::errors::AppError;
+use axum::response::IntoResponse;
+
+pub async fn page_404() -> impl IntoResponse {
+ AppError::NotFound("Route not found".to_string())
+}