fix(errors): swap the http response when deleting a user is restricted

This commit is contained in:
perf3ct 2025-07-21 19:34:33 +00:00
parent c382f0651f
commit 6fcae1e752
1 changed files with 1 additions and 1 deletions

View File

@ -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,