Ignore errors

Errors (or exceptions) raised by an app will be visible in the Error incident list. Not all errors are important and can be ignored.

To prevent AppSignal from reporting these errors and alerting you, you can add a list of errors to ignore in the app's configuration. Ignoring errors will filter out the error data from the data sent to AppSignal. The filtered error will not be visible in the incident lists.

🔕 If you only don't want to be notified about certain errors, but still report them, please read about our notification settings to customize the app's notification settings.

Ignoring errors

To ignore errors, it's possible to configure an "ignore errors" denylist in the AppSignal integration configuration. By adding error names to this list the integrations will know not to send any ignored error data along with the other app data.

For each configuration the "ignore errors" list needs to be set in the AppSignal configuration. Read this guide for the integration language your app uses to configure the ignored errors list.

💡 It's not possible to ignore all errors, or disable error reporting entirely. It is possible to disable notifications for errors.

Ruby

To ignore errors in Ruby, add the following to your AppSignal configuration file. The ignore_errors value is an Array of Strings.

# Example: config/appsignal.yml
production:
  ignore_errors:
    - ActiveRecord::RecordNotFound
    - ActionController::RoutingError

⚠️ Names set in ignore_errors will be matched on class name and not class inheritance. If you want to match all subclasses of a certain Exception, all subclasses have to be listed separately.

Read more

Elixir

To ignore errors in Elixir, add the following to your AppSignal configuration file. The ignore_errors value is a List of Strings.

# Example: config/appsignal.exs
config :appsignal, :config,
  ignore_errors: ["SpecificError", "AnotherError"]

⚠️ Names set in ignore_errors will be matched on module name.

Read more

Node.js

To ignore errors in Node.js, add the following to your AppSignal configuration file. The ignoreErrors value is an Array of Strings.

// Example: appsignal.js
const { Appsignal } = require("@appsignal/nodejs");
 
const appsignal = new Appsignal({
  // Other config
  ignoreErrors: ["SpecificError", "AnotherError"],
});
 
module.exports = { appsignal };

⚠️ Names set in ignoreErrors will be matched on the Error objects name property only, and will not honor any class inheritance. If you want to match subclasses of Error, each subclass has to be listed separately.

Read more

Front-end JavaScript

To ignore errors in Front-end JavaScript, add the following to your AppSignal configuration file. The ignoreErrors value is an Array of Regular expressions.

// Example: appsignal.js
import Appsignal from "@appsignal/javascript";
 
export const appsignal = new Appsignal({
  // Other config
  ignoreErrors: [/a specific error message/, /another error message/],
});

⚠️ Names set in ignoreErrors will be matched by using a regular expression. The regular expression is matched message property of a given Error.

Read more

Next steps


Want to help us improve this documentation page?

Create a pull request

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial