solid_errors
solid_errors copied to clipboard
Add `ActiveStorage::FileNotFoundError` to ignored errors
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::FileNotFoundErrorshould 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::FileNotFoundErrorto the defaultIGNORED_ERRORS. - Provide a configuration option like:
SolidErrors.configure do |config|
config.ignored_errors += ["ActiveStorage::FileNotFoundError"]
end