Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit ee6a0a9

Browse files
committed
Rename unprocessable_entity to unprocessable_content
When the 422 status was initially proposed in [RFC4918](https://datatracker.ietf.org/doc/html/rfc4918) (2007), it was called 'Unprocessable entity'. When it became a standard in [RFC9110](https://datatracker.ietf.org/doc/html/rfc9110) (2022), it was renamed 'Unprocessable content'. Rack now supports it as `:unprocessable_content` and has deprecated `:unprocessable_entity`. This commit updates it to use the new name.
1 parent 81546c3 commit ee6a0a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ def missing_parameter(exception)
6565
end
6666

6767
def invalid_record(resource)
68-
render json: resource.record.errors, status: :unprocessable_entity
68+
render json: resource.record.errors, status: :unprocessable_content
6969
end
7070
end

0 commit comments

Comments
 (0)