#Override Phoenix' error handling with `Plug.ErrorHandler` (behaviour)

5 messages · Page 1 of 1 (latest)

formal bridge
#

I am looking for a nice way to override Phoenix' error handling with an implementation of the behaviour Plug.ErrorHandler instead.

#

Basically, I want to override Phoenix.Endpoint.RenderErrors.

molten zephyr
#

Removing render_errors in the endpoint config in "config/config.exs" and setting up Plug.ErrorHandler in "endpoint.ex" seems to work fine.

#

Or I guess the endpoint is still trying to render the error after the error handler.

#

Shrug... might have to not use Phoenix.Endpoint. You're fighting the framework, expect it to be onerous.