I want to return a server error (503) to client side when there is an exception raised inside the request handler. Currently I got the following error message in the log. And client side wait a long time to timeout..
2017-08-22 15:20:19 [ vert.x-eventloop-thread-5:32930 ] - [ ERROR ]
Unhandled exception
java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.CharSequence
I googled, and found the failureHandler, but it was not called when the exception raised. The exception is thrown inside a result callback of a mongodb query when parsing the JsonObject.
Just wondering if there is an exception handler for this situation so we can return a server error to client instead of making client waiting for a long timeout.
Thanks,
Han