Skip to content

Commit 906dd06

Browse files
fix status code
1 parent 6be9ea9 commit 906dd06

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/apikeys.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ impl actix_web::ResponseError for ApiKeyError {
6565
ApiKeyError::KeyNotFound(_) => actix_web::http::StatusCode::NOT_FOUND,
6666
ApiKeyError::DuplicateKeyName(_) => actix_web::http::StatusCode::CONFLICT,
6767
ApiKeyError::Unauthorized(_) => actix_web::http::StatusCode::FORBIDDEN,
68-
ApiKeyError::Storage(_) | ApiKeyError::Rbac(_) | ApiKeyError::Anyhow(_) => {
68+
ApiKeyError::Rbac(err) => actix_web::ResponseError::status_code(err),
69+
ApiKeyError::Storage(_) | ApiKeyError::Anyhow(_) => {
6970
actix_web::http::StatusCode::INTERNAL_SERVER_ERROR
7071
}
7172
}

0 commit comments

Comments
 (0)