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

Return 422 (unprocessable entity) when form submissions fails #278

Closed
marckohlbrugge opened this issue Jun 17, 2021 · 1 comment · Fixed by #294
Closed

Return 422 (unprocessable entity) when form submissions fails #278

marckohlbrugge opened this issue Jun 17, 2021 · 1 comment · Fixed by #294

Comments

@marckohlbrugge
Copy link

marckohlbrugge commented Jun 17, 2021

Hotwire Turbo (formerly known as Turbolinks) requires a failed POST request to return a 422 response (unprocessable entity). Wicked currently returns a 200 (ok) response which makes it incompatible with Turbo.

In the past a PR ( #267 ) was created to change the status to unprocessable entity but this was rejected in order to stick to Rails' own defaults.

These defaults in Rails have now changed to also use 422 for failed POST requests. So I'd like to request Wicked to be updated to do the same.

The existing PR seems like a good solution.

@deepakmahakale
Copy link
Member

Sounds good
But we may need to rebase the PR.

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 a pull request may close this issue.

2 participants