Logo of AppSignal

Docs navigation

Ignore errors

Sometimes an error is raised which AppSignal shouldn't send an alert about. It's not desired to capture an exception with a begin..rescue block just to prevent AppSignal from alerting you. Instead, the exception should be handled by the framework the application is using.

To prevent AppSignal from picking up these errors and alerting you, you can add exceptions that you want to ignore to the list of ignored errors in your configuration.

# config/appsignal.yml
default: &defaults
    - ActiveRecord::RecordNotFound
    - ActionController::RoutingError

Note: Names set in ignore_errors will be matched on String basis and not class inheritance. If you want to match all subclasses of a certain Exception they have to be listed separately.

You can also configure ignore exceptions via an environment variable.

export APPSIGNAL_IGNORE_ERRORS="ActiveRecord::RecordNotFound,ActionController::RoutingError"

Any exceptions defined here will not be sent to AppSignal and will not trigger a notification.

Read more about Exception handling with AppSignal. And read more about Exception in the official Ruby documentation.