mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-25 01:21:01 +00:00
Fix wrong http status code
This commit is contained in:
parent
28efe341cb
commit
fb18f5e17a
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ impl Error {
|
|||
pub fn http_status_code(&self) -> StatusCode {
|
||||
match self {
|
||||
Error::NotFound => StatusCode::NOT_FOUND,
|
||||
Error::ApiError(e) => e.http_status_code(),
|
||||
Error::Forbidden(_) => StatusCode::FORBIDDEN,
|
||||
Error::InternalError(GarageError::RPC(_)) => StatusCode::SERVICE_UNAVAILABLE,
|
||||
Error::InternalError(_) | Error::Hyper(_) | Error::HTTP(_) => {
|
||||
|
|
Loading…
Reference in a new issue