Skip to content

Conversation

seanpdoyle
Copy link
Contributor

Integrate ActiveSupport::Rescuable with ActiveResource::Base methods that trigger calls to the underlying connection.

This change includes rescue_from support for:

  • #create
  • #update
  • #destroy
  • #reload

Integrate [ActiveSupport::Rescuable][] with `ActiveResource::Base`
methods that trigger calls to the underlying connection.

This change includes `rescue_from` support for:

* `#create`
* `#update`
* `#destroy`
* `#reload`

[ActiveSupport::Rescuable]: https://edgeapi.rubyonrails.org/classes/ActiveSupport/Rescuable/ClassMethods.html#method-i-rescue_from
Comment on lines +1446 to +1447
rescue => exception
rescue_with_handler(exception) || raise
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If #414 were merged, this change could be removed in favor of a matching declaration in ActiveResource::Rescuable:

around_reload :rescue_exceptions

@rafaelfranca rafaelfranca merged commit 3795aee into rails:main Sep 10, 2025
19 checks passed
@seanpdoyle seanpdoyle deleted the rescuable branch September 10, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants