pallavithegod commented on code in PR #3359:
URL: https://github.com/apache/hugegraph/pull/3359#discussion_r4306722271
##########
hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest/TaskAPI.java:
##########
@@ -108,8 +109,12 @@ public String balanceLeaders() {
}
@GetMapping(value = "/compact")
- public String dbCompaction() throws PDException {
- pdRestService.dbCompaction();
- return "compact ok";
+ public String dbCompaction() {
+ try {
+ pdRestService.dbCompaction();
+ return "compact ok";
+ } catch (PDException e) {
+ return toJSON(e);
Review Comment:
Updated in 8ac1d9410. Compact now returns an explicit ResponseEntity:
successful compact ok remains text/plain, while structured errors use
application/json. TaskAPIResultTest checks both content types and the error
envelope; the API reference documents this contract.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]