summaryrefslogtreecommitdiff
path: root/src/routes/errors.rs
diff options
context:
space:
mode:
authorDaniel Hader <[email protected]>2026-06-02 20:37:40 -0500
committerDaniel Hader <[email protected]>2026-06-02 20:37:40 -0500
commit51fac3f3b6f73b649ba8109b37d8ff311b905cd4 (patch)
tree4a2eb771842bf65ccb6e95c6c1d59ef65cbd2a7d /src/routes/errors.rs
parent14a4d586b7c7abc86674724153757f15faf7262c (diff)
problem statement on submission page and submission logic tweaks
Diffstat (limited to 'src/routes/errors.rs')
-rw-r--r--src/routes/errors.rs4
1 files changed, 4 insertions, 0 deletions
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"))
}
};