Fix error code
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Alex 2022-05-17 16:48:23 +02:00
parent 8ff95f09c9
commit 8b1338ef2f
Signed by: lx
GPG key ID: 0E496D15096376BE
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ pub async fn handle_get_bucket_info(
.bucket_helper()
.resolve_global_bucket_name(&ga)
.await?
.ok_or_bad_request("Bucket not found")?,
.ok_or_else(|| HelperError::NoSuchBucket(ga.to_string()))?,
_ => {
return Err(Error::bad_request(
"Either id or globalAlias must be provided (but not both)",

View file

@ -2,7 +2,7 @@ use err_derive::Error;
use hyper::header::HeaderValue;
use hyper::{Body, HeaderMap, StatusCode};
use garage_model::helper::error::Error as HelperError;
pub use garage_model::helper::error::Error as HelperError;
use crate::common_error::CommonError;
pub use crate::common_error::{CommonErrorDerivative, OkOrBadRequest, OkOrInternalError};