From 22d993b7c076c591cde13105b8f6707433945842 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 10 Sep 2022 12:58:47 +0200 Subject: Raise 404 error for not route found --- src/routes/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/routes') 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()) +} -- cgit v1.2.3-71-g8e6c