mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-11 23:06:54 +00:00
Starting to be S3 compatible
This commit is contained in:
@@ -69,6 +69,9 @@ pub enum Error {
|
||||
#[error(display = "Bad request: {}", _0)]
|
||||
BadRequest(String),
|
||||
|
||||
#[error(display = "Forbidden: {}", _0)]
|
||||
Forbidden(String),
|
||||
|
||||
#[error(display = "Not found")]
|
||||
NotFound,
|
||||
|
||||
@@ -84,6 +87,7 @@ impl Error {
|
||||
match self {
|
||||
Error::BadRequest(_) => StatusCode::BAD_REQUEST,
|
||||
Error::NotFound => StatusCode::NOT_FOUND,
|
||||
Error::Forbidden(_) => StatusCode::FORBIDDEN,
|
||||
Error::RPC(_) => StatusCode::SERVICE_UNAVAILABLE,
|
||||
_ => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user