FrankChen021 commented on a change in pull request #12026:
URL: https://github.com/apache/druid/pull/12026#discussion_r769184218



##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java
##########
@@ -1297,7 +1298,7 @@ public Response getPhaseName(@Context final 
HttpServletRequest req)
         return Response.ok(runner.getName()).build();
       }
     } else {
-      return Response.status(Status.BAD_REQUEST).entity("task is running in 
the sequential mode").build();
+      return 
ResponseStatusExceptionMapper.toResponse(Response.Status.BAD_REQUEST, "task is 
running in the sequential mode");

Review comment:
       I think it's safe to do this because we don't know in the future if the 
string content will be changed. If it's changed, there's a risk to experience 
the same problem we're facing now.
   
   Actually, the original API reported by the author is also a user facing API, 
changing the response seems incompatibility. But I think it's OK because these 
changes happen in error cases which are rare.




-- 
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]

Reply via email to