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

context.fail! not working on Rails 6.0 #203

Open
rbazinet opened this issue Dec 6, 2021 · 4 comments
Open

context.fail! not working on Rails 6.0 #203

rbazinet opened this issue Dec 6, 2021 · 4 comments

Comments

@rbazinet
Copy link

rbazinet commented Dec 6, 2021

I am having an issue where I use an organizer with 6 interactors. If one of the interactors fails, I expect the rest to not be run.

I have code that calls context.fail! but it appears to not work with Rails 6. The exact same code works fine with Rails 5.2.x.

Anyone experience this problem?

@d3mash
Copy link

d3mash commented Dec 14, 2021

Hi! Can you please provide a reproducible snippet?

@rstacruz
Copy link

@rbazinet, I'm not sure about Rails 6, but there's an open issue about fail! errors that might be relevant: #170

@aliahmadexe
Copy link

@rbazinet hey!
i upgraded my project from 5.2 to 6.1 and context.fail! is giving me undefined method `empty?' for nil:NilClass
did you solve the problem in rails 6?

@benjaminwil
Copy link

benjaminwil commented Mar 9, 2023

I experienced this problem today while upgrading a project from Rails 5.2 to Rails 6.1. But in the end, it was because I upgraded the Ruby version to 2.7—not because of Rails 6 specifically.

A bundle update interactor (from v3.1.1 to v3.1.2) fixed the issue.

I expect it's because of this commit, which came in the 3.1.2 release.

Hope this helps someone. 👍

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

No branches or pull requests

5 participants