diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-13 19:36:17 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-13 19:36:17 +0200 |
commit | 8033bdb0b4577133cff7d4d90a811ed8f3e13365 (patch) | |
tree | 5f4abf43f18322c64db68787d91a227aa4421b97 /src/api/s3/error.rs | |
parent | 5a535788fc0a69950bbfdc6f189597c5e37a6e3b (diff) | |
download | garage-8033bdb0b4577133cff7d4d90a811ed8f3e13365.tar.gz garage-8033bdb0b4577133cff7d4d90a811ed8f3e13365.zip |
More precisions in errors & small refactoring
Diffstat (limited to 'src/api/s3/error.rs')
-rw-r--r-- | src/api/s3/error.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/api/s3/error.rs b/src/api/s3/error.rs index 4edff3a1..f2096bea 100644 --- a/src/api/s3/error.rs +++ b/src/api/s3/error.rs @@ -91,8 +91,10 @@ impl From<HelperError> for Error { match err { HelperError::Internal(i) => Self::CommonError(CommonError::InternalError(i)), HelperError::BadRequest(b) => Self::CommonError(CommonError::BadRequest(b)), - HelperError::InvalidBucketName(_) => Self::CommonError(CommonError::InvalidBucketName), - HelperError::NoSuchBucket(_) => Self::CommonError(CommonError::NoSuchBucket), + HelperError::InvalidBucketName(n) => { + Self::CommonError(CommonError::InvalidBucketName(n)) + } + HelperError::NoSuchBucket(n) => Self::CommonError(CommonError::NoSuchBucket(n)), e => Self::bad_request(format!("{}", e)), } } |