Closed philippneugebauer closed 6 years ago
I have the following piece of code to filter all non-500 errors from reporting:
defp handle_errors(conn, %{kind: kind, reason: reason, stack: stacktrace}) do
if report?(kind, reason) do
# ...
end
end
defp report?(:error, exception), do: Plug.Exception.status(exception) == 500
defp report?(_kind, _reason), do: true
Since you handle the logic of reporting errors to Rollbar through Rollbax directly, you're responsible for any filtering and such. The example code @ericmj is very valid though, so I'd probably do something like that :).
I'm getting a lot of requests with no route found for
mysql/admin
.What do you think is the best option to implement the ignore behavior? Maybe it is a good idea to be able to ignore errors by config?