# Prevent Plug.ErrorHandler from re-raising error after callback

**URL:** <https://forum.elixirforum.com/t/prevent-plug-errorhandler-from-re-raising-error-after-callback/35128>\
**Category:** Questions\
**Tags:** plug, error-handling, plug-error\
**Created:** [October 25, 2020, 5:35pm UTC](https://forum.elixirforum.com/t/prevent-plug-errorhandler-from-re-raising-error-after-callback/35128 "2020-10-25T17:35:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![al2o3cr](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/al2o3cr/32/3457_2.png) [@al2o3cr](https://forum.elixirforum.com/u/al2o3cr)\
**Post date:** [October 25, 2020, 8:43pm UTC](https://forum.elixirforum.com/t/prevent-plug-errorhandler-from-re-raising-error-after-callback/35128/2 "2020-10-25T20:43:53Z")

</div>

Take a look at the tests for `Plug.ErrorHandler` for ideas about how to test this:

[https://github.com/elixir-plug/plug/blob/v1.10.4/test/plug/error\_handler\_test.exs](https://github.com/elixir-plug/plug/blob/v1.10.4/test/plug/error_handler_test.exs)

For your specific situation, the error message shows `body_params: %{}` - because `Plug.Parsers.JSON` specifically documents that an [empty body will parse to `%{}`](https://github.com/elixir-plug/plug/blob/master/lib/plug/parsers/json.ex#L8)

---

_[View the full topic](https://forum.elixirforum.com/t/prevent-plug-errorhandler-from-re-raising-error-after-callback/35128)._
