6.17.4 ExceptionHandler

Alternatively, you can implement an ExceptionHandler, a generic hook for handling exceptions that occur during execution of an HTTP request.

An @Error annotation capturing an exception has precedence over an implementation of ExceptionHandler capturing the same exception.