2.6.13
Scala
The error handler dispatched to should be the class defined by config property play.http.errorHandler
As described in documentation here
play.core.server.Server#getHandlerFor always uses DefaultHttpErrorHandler.onServerError through this method logExceptionAndGetResult
This goes against even the doc for the handler which states
Note: this HttpErrorHandler should ONLY be used in DEV or TEST. The way this displays errors to the >user is generally not suitable for a production environment.
And this is basically the issue I wanted to raise, I'm trying to get the custom error handler to execute on our production build so Play html error messages aren't returned. My specific error producing use case is exceptions generated by custom request bindables i.e. using this feature (https://www.playframework.com/documentation/2.6.x/RequestBinders)
Hi @aselamal,
Thanks for reporting that. I was able to reproduce the problem using a PathBindable that throws an exception.
Do you want to submit a PR to fix the problem?
Best.
Hello,
thanks for your response, At this point in time I'm not familiar enough with the play internals to know how to fix it.
No worries. I think I figured out the problem. See #8506.
Most helpful comment
No worries. I think I figured out the problem. See #8506.