> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ignore Errors

Errors (or exceptions) raised by your application will be visible in the [Error incident list][error incident list].
You may find AppSignal notifying you of errors you do not consider important. To prevent this, you can add a list of errors to an ignore list in
your application's configuration. AppSignal will then only notify you of errors that are not on the ignore list.

<Note>
  🔕 If you want AppSignal to mute error notifications rather than ignore them,
  [read our Notification Settings][notifications] Documentation to learn how to
  customize your application's notification settings.
</Note>

## Ignoring errors

To ignore errors you can configure an "ignore errors" *denylist* in your AppSignal integration configuration. By adding error names to this list the integrations will filter out ignored errors from data sent to AppSignal.

This guide will show you how to configure your ignore errors denylist based on what language your application uses:

* [Ruby](#ruby)
* [Elixir](#elixir)
* [Node.js](#nodejs)
* [Python](#python)
* [Front-end JavaScript](#front-end-javascript)
* [Go](#go)
* [Java](#java)
* [PHP](#php)

<Tip>
  It's not possible to ignore all errors, or disable error reporting entirely.
  It is possible to [disable notifications for errors][notifications].
</Tip>

## Ruby

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

<CodeGroup>
  ```ruby Ruby theme={null}
  Appsignal.configure do |config|
    config.ignore_errors += ["ActiveRecord::RecordNotFound", "ActionController::RoutingError"]
  end
  ```

  ```yaml YAML theme={null}
  production:
    ignore_errors:
      - ActiveRecord::RecordNotFound
      - ActionController::RoutingError
  ```
</CodeGroup>

<Warning>
  Names set in [`ignore_errors`][ruby 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.
</Warning>

### Read More {/* id: ruby-read-more */}

* Read more about the [Ruby `ignore_errors` config option][ruby ignore_errors].
* [Exception handling with AppSignal in Ruby](/ruby/instrumentation/exception-handling).

## Elixir

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

<CodeGroup>
  ```elixir Elixir theme={null}
  config :appsignal, :config,
    ignore_errors: ["SpecificError", "AnotherError"]
  ```
</CodeGroup>

<Warning>
  Names set in [`ignore_errors`][elixir ignore_errors] will be matched on module
  name.
</Warning>

### Read More {/* id: elixir-read-more */}

* Read more about the [Elixir `ignore_errors` config option][elixir ignore_errors].
* [Exception handling with AppSignal in Elixir](/elixir/instrumentation/exception-handling).

## Node.js

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

<CodeGroup>
  ```javascript Node.js theme={null}
  const { Appsignal } = require("@appsignal/nodejs");

  new Appsignal({
    // Other config
    ignoreErrors: ["SpecificError", "AnotherError"],
  });
  ```
</CodeGroup>

<Warning>
  Names set in [`ignoreErrors`][nodejs ignore_errors] 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.
</Warning>

### Read More {/* id: nodejs-read-more */}

* Read more about the [Node.js `ignoreErrors` config option][nodejs ignore_errors].
* [Exception handling with AppSignal in Node.js](/nodejs/3.x/instrumentation/exception-handling).

## Python

To ignore errors in Python, add the following to your AppSignal configuration file. The [`ignore_errors`][python ignore_errors] value is a list of strings.

<CodeGroup>
  ```python Python theme={null}
  from appsignal import Appsignal

  appsignal = Appsignal(
      # Other config
      ignore_errors: ["SpecificError", "AnotherError"],
  )
  ```
</CodeGroup>

<Warning>
  Names set in [`ignore_errors`][python ignore_errors] will be matched on the
  Exception class name only, and will not honor any class inheritance. If you
  want to match subclasses of `Exception`, each subclass has to be listed
  separately.
</Warning>

### Read More {/* id: python-read-more */}

* Read more about the [Python `ignore_errors` config option][python ignore_errors].
* [Exception handling with AppSignal in Python](/python/instrumentation/exception-handling).

## Front-end JavaScript

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

<CodeGroup>
  ```javascript JavaScript theme={null}
  import Appsignal from "@appsignal/javascript";

  export const appsignal = new Appsignal({
    // Other config
    ignoreErrors: [/a specific error message/, /another error message/],
  });
  ```
</CodeGroup>

<Warning>
  Names set in [`ignoreErrors`][js ignore_errors] will be matched by using a
  regular expression. The regular expression is matched `message` property of a
  given `Error`.
</Warning>

### Read More {/* id: javascript-read-more */}

* Read more about the [front-end JavaScript `ignoreErrors` config option][js ignore_errors].
* [Exception handling with AppSignal in front-end JavaScript](/front-end/error-handling).

## Go

To ignore errors in Go applications, configure the [`ignore_errors` config option][go ignore_errors].

Error names are matched exactly by their name, not by inheritance. You can see a list of errors in the "Action and error type" column of the *Issue list* under [Errors](https://appsignal.com/redirect-to/app?to=exceptions) in the sidebar. To ignore a specific error, copy the name as it appears in the UI and add it to the `ignore_errors` option.

See the [Go configuration page](/go/configuration/options) for more information on how to configure OpenTelemetry for Go apps.

<CodeGroup>
  ```go Go theme={null}
  res := resource.NewWithAttributes(
  	attribute.StringSlice("appsignal.config.ignore_errors", []string{"MyCustomError", "ExpectedError"}),
  	// And other resource attributes
  )
  ```
</CodeGroup>

### Read More {/* id: go-read-more */}

* Read more about the [Go `ignore_errors` config option][go ignore_errors].

## Java

To ignore errors in Java applications, configure the [`ignore_errors` config option](/java/configuration/options#option-ignore_errors) using the `OTEL_RESOURCE_ATTRIBUTES` environment variable.

Error names are matched exactly by their name, not by inheritance. You can see a list of errors in the "Action and error type" column of the *Issue list* under [Errors](https://appsignal.com/redirect-to/app?to=exceptions) in the sidebar. To ignore a specific error, copy the name as it appears in the UI and add it to the `ignore_errors` option.

See the [Java configuration page](/java/configuration/options) for more information on how to configure OpenTelemetry for Java apps.

<CodeGroup>
  ```bash Bash theme={null}
  function encode() {
    echo -n "$@" | sed 's/,/%2C/g'
  }

  export OTEL_RESOURCE_ATTRIBUTES="\
    appsignal.config.ignore_errors=$(encode "MyCustomError,ExpectedError"),\
    ..."
  ```
</CodeGroup>

<Warning>
  Names set in
  [`ignore_errors`](/java/configuration/options#option-ignore_errors) will
  be matched on the Exception class name only, and will not honor any class
  inheritance. If you want to match subclasses of `Exception`, each subclass has
  to be listed separately.
</Warning>

### Read More {/* id: java-read-more */}

* Read more about the [Java `ignore_errors` config option](/java/configuration/options#option-ignore_errors).

## PHP

To ignore errors in PHP applications, configure the [`ignore_errors` config option](/php/configuration/options#option-ignore_errors).

<CodeGroup>
  ```php PHP theme={null}
  return [
      'ignore_errors' => ['SpecificError', 'AnotherError'],
      // ... other options
  ];
  ```
</CodeGroup>

<Warning>
  Names set in
  [`ignore_errors`](/php/configuration/options#option-ignore_errors) will
  be matched on the Exception class name only, and will not honor any class
  inheritance. If you want to match subclasses of `Exception`, each subclass has
  to be listed separately.
</Warning>

### Read More {/* id: php-read-more */}

* Read more about the [PHP `ignore_errors` config option](/php/configuration/options#option-ignore_errors).

[elixir ignore_errors]: /elixir/configuration/options.html#option-ignore_errors

[error incident list]: https://appsignal.com/redirect-to/app?to=exceptions

[js ignore_errors]: /front-end/configuration/

[nodejs ignore_errors]: /nodejs/3.x/configuration/options.html#option-ignoreerrors

[notifications]: /application/notification-settings.html

[ruby ignore_errors]: /ruby/configuration/options.html#option-ignore_errors

[python ignore_errors]: /python/configuration/options.html#option-ignore_errors

[go ignore_errors]: /go/configuration/options.html#option-ignore_errors
