Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mix-in ActiveSupport::Rescuable #423

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seanpdoyle
Copy link

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
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

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.

1 participant