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
For your specific situation, the error message shows body_params: %{} - because Plug.Parsers.JSON specifically documents that an empty body will parse to %{}






















