fix(errors): swap the http response when deleting a user is restricted
This commit is contained in:
parent
b0bb0b95d6
commit
4e1b3e8d6c
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue