narendly commented on a change in pull request #1049:
URL: https://github.com/apache/helix/pull/1049#discussion_r434231411
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/resources/AbstractResource.java
##########
@@ -98,6 +98,11 @@ protected Response serverError() {
return Response.serverError().build();
}
+ protected Response serverError(String errorMsg) {
+ return
Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(errorMsgToJson(errorMsg))
Review comment:
serverError() contains build(). We do not want to build before we set
the entity. It's simply unnecessary. The consistency you're looking for is with
the notFound() function with the same parameter.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]