summaryrefslogtreecommitdiff
path: root/src/message
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-09 22:52:42 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-09 23:49:40 -0400
commite55565cb3841bf17cf7b8a5e5cf84e59e4372e11 (patch)
tree31fdbf7d8fbd6b1783c599347642592e4b44ea13 /src/message
parent66c99389e4725d96ef68298a9c608654b9517d4b (diff)
Normalize `not found` errors a bit.
Diffstat (limited to 'src/message')
-rw-r--r--src/message/routes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/message/routes.rs b/src/message/routes.rs
index 29fe3d7..e21c674 100644
--- a/src/message/routes.rs
+++ b/src/message/routes.rs
@@ -9,7 +9,7 @@ use axum::{
use crate::{
app::App,
clock::RequestedAt,
- error::Internal,
+ error::{Internal, NotFound},
login::Login,
message::{self, app::DeleteError},
};
@@ -38,7 +38,7 @@ impl IntoResponse for ErrorResponse {
let Self(error) = self;
match error {
not_found @ (DeleteError::ChannelNotFound(_) | DeleteError::NotFound(_)) => {
- (StatusCode::NOT_FOUND, not_found.to_string()).into_response()
+ NotFound(not_found).into_response()
}
other => Internal::from(other).into_response(),
}