summaryrefslogtreecommitdiff
path: root/src/setup/routes/post.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup/routes/post.rs')
-rw-r--r--src/setup/routes/post.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/setup/routes/post.rs b/src/setup/routes/post.rs
index f7b256e..2a46b04 100644
--- a/src/setup/routes/post.rs
+++ b/src/setup/routes/post.rs
@@ -42,6 +42,9 @@ impl IntoResponse for Error {
fn into_response(self) -> Response {
let Self(error) = self;
match error {
+ app::Error::InvalidName(_) => {
+ (StatusCode::BAD_REQUEST, error.to_string()).into_response()
+ }
app::Error::SetupCompleted => (StatusCode::CONFLICT, error.to_string()).into_response(),
other => Internal::from(other).into_response(),
}