Skip to content

Commit 8f13a0e

Browse files
improved error messages for remove ingestor API (#843)
1 parent 245aa8b commit 8f13a0e

File tree

1 file changed

+6
-4
lines changed
  • server/src/handlers/http/cluster

1 file changed

+6
-4
lines changed

server/src/handlers/http/cluster/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,9 @@ pub async fn remove_ingestor(req: HttpRequest) -> Result<impl Responder, PostErr
472472
let domain_name = to_url_string(domain_name);
473473

474474
if check_liveness(&domain_name).await {
475-
return Err(PostError::Invalid(anyhow::anyhow!("Node Online")));
475+
return Err(PostError::Invalid(anyhow::anyhow!(
476+
"The ingestor is currently live and cannot be removed"
477+
)));
476478
}
477479
let object_store = CONFIG.storage().get_object_store();
478480

@@ -500,13 +502,13 @@ pub async fn remove_ingestor(req: HttpRequest) -> Result<impl Responder, PostErr
500502
.await
501503
{
502504
Ok(_) => {
503-
format!("Node {} Removed Successfully", domain_name)
505+
format!("Ingestor {} removed successfully", domain_name)
504506
}
505507
Err(err) => {
506508
if matches!(err, ObjectStorageError::IoError(_)) {
507-
format!("Node {} Not Found", domain_name)
509+
format!("Ingestor {} is not found", domain_name)
508510
} else {
509-
format!("Error Removing Node {}\n Reason: {}", domain_name, err)
511+
format!("Error removing ingestor {}\n Reason: {}", domain_name, err)
510512
}
511513
}
512514
};

0 commit comments

Comments
 (0)