diff options
Diffstat (limited to 'src/api/k2v')
-rw-r--r-- | src/api/k2v/error.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/api/k2v/error.rs b/src/api/k2v/error.rs index 85d5de9d..dbd9a5f5 100644 --- a/src/api/k2v/error.rs +++ b/src/api/k2v/error.rs @@ -59,8 +59,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::CommonError(CommonError::BadRequest(format!("{}", e))), } } |