From a104c33974262f439d3569a18599a167f0ab5dc7 Mon Sep 17 00:00:00 2001 From: Csrayz Date: Wed, 20 Aug 2025 23:49:59 +0800 Subject: [PATCH] [FEAT] add error message (#435) When the bucket is not found, return a helpful message --- rustfs/src/admin/handlers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rustfs/src/admin/handlers.rs b/rustfs/src/admin/handlers.rs index 2c0140846..e036846c8 100644 --- a/rustfs/src/admin/handlers.rs +++ b/rustfs/src/admin/handlers.rs @@ -852,7 +852,7 @@ impl Operation for SetRemoteTargetHandler { if let Some(bucket) = queries.get("bucket") { if bucket.is_empty() { 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 { return Err(S3Error::with_message(S3ErrorCode::InternalError, "Not init".to_string()));