79806625

Date: 2025-11-01 15:16:15
Score: 1.5
Natty:
Report link

Rails.error.unexpected("Unexpected error") do

my_possible_error_code

end

The error is swallowed in production but not in test/development. But the error is wrapped in a ActiveSupport::ErrorReporter::UnexpectedError and the original message is hidden, which makes the console/log output information useless.

Where is the sweet combination where?:

The error is swallowed in production

The error is raised in test/development

Or, what workaround I can do to have this behaviour?

ruby-on-railserror-handling

Share

Edit

Follow

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: A b Aquzai