Skip to content

Reducing noise

Sometimes there are errors that you would rather not send to Honeybadger because they are not actionable or are handled internally. By default Honeybadger will be notified when any error occurs. To override this configuration in order not to send out errors to Honeybadger, set exclude_errors option in config/config.exs.

This can be done by passing a list of errors to be excluded:

config :honeybadger,
exclude_errors: ["RuntimeError"]

or

config :honeybadger,
exclude_errors: [RuntimeError]

Also you can implement the Honeybadger.ExcludeErrors behaviour function exclude_error?/1, which receives the full Honeybadger.Notice and returns a boolean signalling the error exclusion or not.

defmodule ExcludeFunClauseErrors do
alias Honeybadger.ExcludeErrors
@behaviour ExcludeErrors
@impl ExcludeErrors
def exclude_error?(notice) do
notice.error.class == "FunctionClauseError"
end
end
config :honeybadger,
exclude_errors: ExcludeFunClauseErrors