solid_errors icon indicating copy to clipboard operation
solid_errors copied to clipboard

Add `ActiveStorage::FileNotFoundError` to ignored errors

Open chorstikus opened this issue 3 months ago • 0 comments

Currently, the list of ignored errors in SolidErrors::Subscriber::IGNORED_ERRORS is static and cannot be extended without modifying the source code directly.

We’d like to add:

ActiveStorage::FileNotFoundError

to the IGNORED_ERRORS array, since missing files in ActiveStorage are a common on staging server, often non-critical scenario that shouldn’t generate error reports.

Current Behavior

  • The ignored errors list is fixed.
  • Adding new ignored errors requires editing the gem directly.

Expected Behavior

  • ActiveStorage::FileNotFoundError should be ignored by default.
  • Ideally, the ignored errors list should be configurable, allowing users to extend or override it without patching the gem.

Suggested Solution

  • Add ActiveStorage::FileNotFoundError to the default IGNORED_ERRORS.
  • Provide a configuration option like:
SolidErrors.configure do |config|
  config.ignored_errors += ["ActiveStorage::FileNotFoundError"]
end

chorstikus avatar Oct 02 '25 11:10 chorstikus