-
Notifications
You must be signed in to change notification settings - Fork 633
Exception
Steve Hu edited this page Sep 30, 2016
·
1 revision
If any handler throws an exception within the handler chain, that exception will bubble up to the undertow server and eventually a 500 response will be sent to the consumer. In order to change the behaviour, an exception handler is provided to handle ApiException and other uncaught exceptions.
Any runtime exception will be captured and return a standard 500 error with error code ERR10010.
Any checked exception that is not handled by handlers in the handler chain is captured and return a 400 error with error code ERR10011
ApiException has a status object and it will return to consume the data defined in the status object.
Exception handler will log the exception with stacktrace.