kenhuuu commented on code in PR #2594: URL: https://github.com/apache/tinkerpop/pull/2594#discussion_r1592971797
########## gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpHandlerUtil.java: ########## @@ -69,6 +71,20 @@ public class HttpHandlerUtil { * @param message The error message to contain the body. */ public static void sendError(final ChannelHandlerContext ctx, final HttpResponseStatus status, final String message) { + sendError(ctx, status, message, false); + } + + /** + * Helper method to send errors back as JSON. Only to be used when the RequestMessage couldn't be parsed, because + * a proper serialized ResponseMessage should be sent in that case. + * + * @param ctx The netty channel context. + * @param status The HTTP error status code. + * @param message The error message to contain the body. + * @param closeChannel Close the netty channel after error message. + */ + public static void sendError(final ChannelHandlerContext ctx, final HttpResponseStatus status, final String message, Review Comment: When is closing the channel explicitly needed? -- 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: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org