In my code (3.9.1) I'm using the ErrorHandler like so:
router.errorHandler 500, ErrorHandler.create()
Sometimes I'm getting an annoying exception, which actually conceals the real error details:
SEVERE: Error in error handler
java.lang.IllegalStateException: Response has already been written
at io.vertx.core.http.impl.HttpServerResponseImpl.checkValid(HttpServerResponseImpl.java:628)
at io.vertx.core.http.impl.HttpServerResponseImpl.putHeader(HttpServerResponseImpl.java:207)
at io.vertx.ext.web.handler.impl.ErrorHandlerImpl.sendError(ErrorHandlerImpl.java:148)
at io.vertx.ext.web.handler.impl.ErrorHandlerImpl.answerWithError(ErrorHandlerImpl.java:86)
As a quick fix I would do the check at line ErrorHandlerImpl:114:
if( response.ended() ){ // or response.headWritten()
return false;
}
In my code (3.9.1) I'm using the ErrorHandler like so:
router.errorHandler 500, ErrorHandler.create()
Sometimes I'm getting an annoying exception, which actually conceals the real error details:
As a quick fix I would do the check at line ErrorHandlerImpl:114: