Skip to content

Change mapping 422 response status#52087

Closed
morgoth wants to merge 1 commit into
rails:mainfrom
tiramizoo:fix-422
Closed

Change mapping 422 response status#52087
morgoth wants to merge 1 commit into
rails:mainfrom
tiramizoo:fix-422

Conversation

@morgoth

@morgoth morgoth commented Jun 11, 2024

Copy link
Copy Markdown
Member

from "unprocessable_entity" to "unprocessable_content"

This fixes the rack deprecation warning released recently in 3.1.0 version.

rack/rack#2137

…processable_content"

This fixes rack deprecation warning

rack/rack#2137
@morgoth

morgoth commented Jun 11, 2024

Copy link
Copy Markdown
Member Author

Hmm, I see that rack 3.0.x does not support new naming, so it won't be that easy...

ArgumentError: Unrecognized status code :unprocessable_content
    /usr/local/bundle/gems/rack-3.0.11/lib/rack/utils.rb:628:in `block in status_code'
    /usr/local/bundle/gems/rack-3.0.11/lib/rack/utils.rb:628:in `fetch'
    /usr/local/bundle/gems/rack-3.0.11/lib/rack/utils.rb:628:in `status_code'
  

@Earlopain

Copy link
Copy Markdown
Contributor

@morgoth

morgoth commented Jun 12, 2024

Copy link
Copy Markdown
Member Author

closing in favor of #52094

@morgoth morgoth closed this Jun 12, 2024
@morgoth morgoth deleted the fix-422 branch June 12, 2024 06:09
@ioquatix

Copy link
Copy Markdown
Contributor

We decided to fix this in Rack for v3.1 - it will still emit a message in v3.2 - but it gives us 12 months to sort it out.

rack/rack#2209

Earlopain added a commit to Earlopain/rails that referenced this pull request Oct 19, 2024
Using `unprocessable_entity` will emit a warning on Rack 3.2.
There have been various PRs in the past for this:
* rails#52252
* rails#52192
* rails#52087
* rails#52097

This to me seems like the least invasive change and is also how headers are currently handled.
Earlopain added a commit to Earlopain/rails that referenced this pull request Mar 3, 2025
Using `unprocessable_entity` will emit a warning on Rack 3.2.
There have been various PRs in the past for this:
* rails#52252
* rails#52192
* rails#52087
* rails#52097

This to me seems like the least invasive change and is also how headers are currently handled.
Earlopain added a commit to Earlopain/rails that referenced this pull request Jul 23, 2025
Using `unprocessable_entity` will emit a warning on Rack 3.2.
There have been various PRs in the past for this:
* rails#52252
* rails#52192
* rails#52087
* rails#52097

This to me seems like the least invasive change and is also how headers are currently handled.
byroot pushed a commit to Earlopain/rails that referenced this pull request Jul 31, 2025
Using `unprocessable_entity` will emit a warning on Rack 3.2.
There have been various PRs in the past for this:
* rails#52252
* rails#52192
* rails#52087
* rails#52097

This to me seems like the least invasive change and is also how headers are currently handled.
drjayvee added a commit to drjayvee/rubygems.org that referenced this pull request Aug 4, 2025
simi pushed a commit to rubygems/rubygems.org that referenced this pull request Aug 4, 2025
viralpraxis pushed a commit to viralpraxis/rails that referenced this pull request Sep 22, 2025
Using `unprocessable_entity` will emit a warning on Rack 3.2.
There have been various PRs in the past for this:
* rails#52252
* rails#52192
* rails#52087
* rails#52097

This to me seems like the least invasive change and is also how headers are currently handled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants