Reducing Noise

Sometimes there are errors that you would rather not send to Honeybadger because they are not actionable or are handled internally.

In Honeybadger, you can ignore exceptions by type using the built-in excluded_exceptions configuration option, as well as the $dontReport option in Laravel.

Ignoring Exceptions By Type

There may be some types of exceptions which you never want to report. To ignore them, use the excluded_exceptions configuration option:

[
    'excluded_exceptions' => [
      SomeException::class,
      AnotherException::class,
    ],
]

Laravel

If you're using Laravel, Honeybadger respects the $dontReport property of Laravel's exception handler when automatically reporting exceptions during web requests. This means that any exceptions which are ignored by Laravel will also be ignored by Honeybadger. You may add other exception types to this array as needed:

// app/Exceptions/Handler.php

/**
 * A list of the exception types that should not be reported.
 *
 * @var array
 */
protected $dontReport = [
    \Illuminate\Auth\AuthenticationException::class,
    \Illuminate\Auth\Access\AuthorizationException::class,
    \Symfony\Component\HttpKernel\Exception\HttpException::class,
    \Illuminate\Database\Eloquent\ModelNotFoundException::class,
    \Illuminate\Validation\ValidationException::class,
];

Keep in mind that Honeybadger will still report exceptions on this list if they are reported outside of Laravel's exception handler, such as when reporting handled exceptions.