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

Respond form submission errors with 422 status code #5325

Closed

Conversation

santib
Copy link

@santib santib commented Jan 6, 2021

Seems like Rails new convention will be returning 422 on form submission errors rails/rails#41026 . It'd be a good idea to wait and see if that Rails PR is merged thus making official the new "convention". The root reason behind the change is supporting Turbo.

More info:

@carlosantoniodasilva
Copy link
Member

Thanks. I think this change actually needs to happen in responders to be the default behavior heartcombo/responders#159, and Devise will follow.

I want to give it a little more time to settle in and for me to review turbo as well, before doing any change since it will require at least a minor (or major) bump.

@carlosantoniodasilva carlosantoniodasilva self-assigned this Jan 6, 2021
@santib
Copy link
Author

santib commented Jan 11, 2021

@carlosantoniodasilva Just a heads up that the Rails PR got merged. Not sure if you still want to wait some more time, if want to close this PR and continue it on the responders gem or what is the correct course of action here.

@carlosantoniodasilva
Copy link
Member

carlosantoniodasilva commented Jan 16, 2021

@santib thanks, I'm working on this on the responders side of things, but I'm gonna leave this open for a bit longer since I also need to ensure Devise works with it fine. (and note the behavior change in the changelog, etc.)

@carlosantoniodasilva
Copy link
Member

FYI: I have a working branch in Responders that should change this behavior to return 422 similarly: heartcombo/responders#223. Any feedback there is welcome.

@gobijan
Copy link

gobijan commented Jan 24, 2021

I think this PR should be closed and the responders gem should be updated. Devise should then use the updated responders gem and things should be good to go. Just had a brief look at devise tests. 422 cases should get added to the tests then.

@carlosantoniodasilva
Copy link
Member

Thanks @gobijan, I'm gonna close it when I get responders released and Devise updated here. (this is sorta working as a reminder for me 😁)

@ghiculescu
Copy link
Contributor

@santib do you want to give #5340 a try? This is required for SessionsController. All other controllers are fixed by heartcombo/responders#223

@carlosantoniodasilva
Copy link
Member

Closing in favor of #5340, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants