Skip to content

Commit

Permalink
fix: permission denied is 403 (#4350)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 authored Jul 11, 2024
1 parent da1ea25 commit 50e4539
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/servers/src/http/error_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,14 @@ impl IntoResponse for ErrorResponse {
| StatusCode::FlowNotFound
| StatusCode::FlowAlreadyExists => HttpStatusCode::BAD_REQUEST,

StatusCode::PermissionDenied
| StatusCode::AuthHeaderNotFound
StatusCode::AuthHeaderNotFound
| StatusCode::InvalidAuthHeader
| StatusCode::UserNotFound
| StatusCode::UnsupportedPasswordType
| StatusCode::UserPasswordMismatch
| StatusCode::RegionReadonly => HttpStatusCode::UNAUTHORIZED,

StatusCode::AccessDenied => HttpStatusCode::FORBIDDEN,
StatusCode::PermissionDenied | StatusCode::AccessDenied => HttpStatusCode::FORBIDDEN,

StatusCode::RateLimited => HttpStatusCode::TOO_MANY_REQUESTS,

Expand Down

0 comments on commit 50e4539

Please sign in to comment.