News for hackers. Stuff that matters.
Re:Elixir Is Erlang, not Ruby by ericmj on Monday September 07, 2020 @08:12AM (#24398865)
> As a simple example, I think Plug.Parser is wrong to raise an exception when invalid json is given to it (shitty user data is hardly "exceptional" and I don't need error logs with poor signal to noise). Plug sets the status code for parser errors to 400: https://github.com/elixir-plug/plug/blob/v1.10.4/lib/plug/pa...

You should check the `:plug_status` field of the exception and only log/report the error if it's in the 5xx range.

There are no comments on this comment yet.