diff options
Diffstat (limited to 'src/api/s3/bucket.rs')
-rw-r--r-- | src/api/s3/bucket.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/s3/bucket.rs b/src/api/s3/bucket.rs index 93048a8c..6ecda2cd 100644 --- a/src/api/s3/bucket.rs +++ b/src/api/s3/bucket.rs @@ -130,7 +130,7 @@ pub async fn handle_create_bucket( if let Some(location_constraint) = cmd { if location_constraint != garage.config.s3_api.s3_region { - return Err(Error::BadRequest(format!( + return Err(Error::bad_request(format!( "Cannot satisfy location constraint `{}`: buckets can only be created in region `{}`", location_constraint, garage.config.s3_api.s3_region @@ -163,7 +163,7 @@ pub async fn handle_create_bucket( } else { // Create the bucket! if !is_valid_bucket_name(&bucket_name) { - return Err(Error::BadRequest(format!( + return Err(Error::bad_request(format!( "{}: {}", bucket_name, INVALID_BUCKET_NAME_MESSAGE ))); |