From 6fcae1e7528eaefaff624f268a181cb21f5d739a Mon Sep 17 00:00:00 2001 From: perf3ct Date: Mon, 21 Jul 2025 19:34:33 +0000 Subject: [PATCH] fix(errors): swap the http response when deleting a user is restricted --- src/errors/user.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/errors/user.rs b/src/errors/user.rs index e153306..161b7f7 100644 --- a/src/errors/user.rs +++ b/src/errors/user.rs @@ -74,7 +74,7 @@ impl AppError for UserError { UserError::InvalidPassword { .. } => StatusCode::BAD_REQUEST, UserError::InvalidUsername { .. } => StatusCode::BAD_REQUEST, UserError::InvalidEmail { .. } => StatusCode::BAD_REQUEST, - UserError::DeleteRestricted { .. } => StatusCode::CONFLICT, + UserError::DeleteRestricted { .. } => StatusCode::FORBIDDEN, UserError::OidcAuthenticationFailed { .. } => StatusCode::UNAUTHORIZED, UserError::AuthProviderNotConfigured { .. } => StatusCode::BAD_REQUEST, UserError::TokenExpired => StatusCode::UNAUTHORIZED,