Introduce ActionDispatch::DebugExceptions interceptors #23868
Plugins interacting with the exceptions caught and displayed by
The interceptors can be plain blocks, procs, lambdas or any object that
You can see
@tgxworld Yes, it is still monkey patching... You can make
I still stand by the interceptors, though. They are super simple and provide what most of the plugins monkey patching
Plugins interacting with the exceptions caught and displayed by ActionDispatch::DebugExceptions currently have to monkey patch it to get the much needed exception for their calculation. With DebugExceptions.register_interceptor, plugin authors can hook into DebugExceptions and process the exception, before being rendered. They can store it into the request and process it on the way back of the middleware chain execution or act on it straight in the interceptor. The interceptors can be play blocks, procs, lambdas or any object that responds to `#call`.