Capturing Errors
Reflex provides multiple ways to capture errors in your Rails application.Automatic Capture
Once installed, Reflex automatically captures:- Unhandled exceptions in controllers
- Background job failures (Sidekiq, ActiveJob)
- Rake task errors
Manual Capture
Capture Exceptions
Capture and Re-raise
If you want to capture but still raise:Capture Messages
For error-like events without an exception:Adding Context
User Context
Tags
Tags are indexed and searchable:Extra Data
Include any additional context:Full Example
Capture Levels
Set the severity level:| Level | Use Case |
|---|---|
info | Informational events |
warning | Something unexpected but not critical |
error | Errors that need attention |
fatal | Critical system failures |