Skip to content

Use unprocessable_content instead of unprocessable_entity for 422 status codes #5791

@Lersoo

Description

@Lersoo

Rack updated its status codes to be in sync with IANA HTTP Status Code Registry : rack/rack#2137

The 422 status code is now Unprocessable Content instead of Unprocessable Entity. While it still works, it will be deprecated at some point. This currently results in a deprecation message when using the default config :

Status code :unprocessable_entity is deprecated and will be removed in a future version of Rack. Please use :unprocessable_content instead.

To reproduce this, try to log in with an invalid email/password on a Rails 8 app with Turbo.

This is easily fixable by devise user by setting config.responder.error_status = :unprocessable_content in the devise config.

However I think it would be nice to reflect this in the docs at least, and in the default generator when officially supporting Rails 8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions