From 51fac3f3b6f73b649ba8109b37d8ff311b905cd4 Mon Sep 17 00:00:00 2001 From: Daniel Hader Date: Tue, 2 Jun 2026 20:37:40 -0500 Subject: problem statement on submission page and submission logic tweaks --- src/routes/errors.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/routes/errors.rs') diff --git a/src/routes/errors.rs b/src/routes/errors.rs index 78b4e3a..f6a0901 100644 --- a/src/routes/errors.rs +++ b/src/routes/errors.rs @@ -7,6 +7,7 @@ pub enum RouteError { UserCreateUsernameExists(String), UnregisteredEmail(String), AuthorizationFailure(), + NotFound(String), } impl IntoResponse for RouteError { @@ -26,6 +27,9 @@ impl IntoResponse for RouteError { }, RouteError::AuthorizationFailure() => { (StatusCode::UNAUTHORIZED, format!("failed to authorize")) + }, + RouteError::NotFound(resource) => { + (StatusCode::NOT_FOUND, format!("{resource} not found")) } }; -- cgit v1.2.3