mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-25 05:26:50 +00:00
[FEAT] add error message (#435)
When the bucket is not found, return a helpful message
This commit is contained in:
@@ -852,7 +852,7 @@ impl Operation for SetRemoteTargetHandler {
|
|||||||
if let Some(bucket) = queries.get("bucket") {
|
if let Some(bucket) = queries.get("bucket") {
|
||||||
if bucket.is_empty() {
|
if bucket.is_empty() {
|
||||||
info!("have bucket: {}", bucket);
|
info!("have bucket: {}", bucket);
|
||||||
return Ok(S3Response::new((StatusCode::OK, Body::from("fuck".to_string()))));
|
return Err(S3Error::with_message(S3ErrorCode::InternalError, "No buckets found".to_string()));
|
||||||
}
|
}
|
||||||
let Some(store) = new_object_layer_fn() else {
|
let Some(store) = new_object_layer_fn() else {
|
||||||
return Err(S3Error::with_message(S3ErrorCode::InternalError, "Not init".to_string()));
|
return Err(S3Error::with_message(S3ErrorCode::InternalError, "Not init".to_string()));
|
||||||
|
|||||||
Reference in New Issue
Block a user