Skip to content

Calling the error handler twice when raising an exception in a rescue_from block #956

@donaldong

Description

@donaldong

When using an ActiveJob Adapter which is not listed in

https://github.com/getsentry/raven-ruby/blob/ff59e93057ac8ac98603f8745f5024df7ed47dc2/lib/raven/integrations/rails/active_job.rb#L4

capture_and_reraise_with_sentry calls rescue_with_handler
https://github.com/getsentry/raven-ruby/blob/ff59e93057ac8ac98603f8745f5024df7ed47dc2/lib/raven/integrations/rails/active_job.rb#L21-L24

However, if the error handler (defined by a rescue_from) raises an error, the same error will be reported to the error handler itself again (double calling the error handler).

Curious what would be a proper workaround? If no workaround seems reasonable, can we provide a way to skip capture_and_reraise_with_sentry (or simply disable the ActiveJobExtensions)?

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions