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 b0bb0b95d6
commit 4e1b3e8d6c
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
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::InvalidPassword { .. } => StatusCode::BAD_REQUEST,
UserError::InvalidUsername { .. } => StatusCode::BAD_REQUEST, UserError::InvalidUsername { .. } => StatusCode::BAD_REQUEST,
UserError::InvalidEmail { .. } => StatusCode::BAD_REQUEST, UserError::InvalidEmail { .. } => StatusCode::BAD_REQUEST,
UserError::DeleteRestricted { .. } => StatusCode::CONFLICT, UserError::DeleteRestricted { .. } => StatusCode::FORBIDDEN,
UserError::OidcAuthenticationFailed { .. } => StatusCode::UNAUTHORIZED, UserError::OidcAuthenticationFailed { .. } => StatusCode::UNAUTHORIZED,
UserError::AuthProviderNotConfigured { .. } => StatusCode::BAD_REQUEST, UserError::AuthProviderNotConfigured { .. } => StatusCode::BAD_REQUEST,
UserError::TokenExpired => StatusCode::UNAUTHORIZED, UserError::TokenExpired => StatusCode::UNAUTHORIZED,