Clarify error message

This commit is contained in:
Alex 2022-01-10 14:10:04 +01:00
parent 17ea28a438
commit 3586c7257c
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1
2 changed files with 10 additions and 9 deletions

View file

@ -127,7 +127,8 @@ pub async fn handle_create_bucket(
if let Some(location_constraint) = cmd { if let Some(location_constraint) = cmd {
if location_constraint != garage.config.s3_api.s3_region { if location_constraint != garage.config.s3_api.s3_region {
return Err(Error::BadRequest(format!( return Err(Error::BadRequest(format!(
"Buckets must be created in region {}", "Cannot satisfy location constraint `{}`: buckets can only be created in region `{}`",
location_constraint,
garage.config.s3_api.s3_region garage.config.s3_api.s3_region
))); )));
} }