Hacker News new | ask | show | jobs
by DouweM 4325 days ago
We had a bit of a discussion about that, finally settling on adding `rescue_from` which you'll know from ActionController and raising a `ActiveJob::DeserializationError` wrapping `ActiveRecord::RecordNotFound`, allowing you to handle this lookup failure however you see fit.

See the original discussion here: https://github.com/rails/activejob/issues/25

The discussion was then continued here: https://github.com/rails/rails/pull/16485#discussion-diff-16..., which is where the `ActiveJob::DeserializationError` comes from.