From ee6a0a9a94fdf17fc4602baab85070fa9fa8c845 Mon Sep 17 00:00:00 2001 From: David Biddle Date: Fri, 15 Aug 2025 10:46:23 +0100 Subject: [PATCH] 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. --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bcba3836..3d2455af 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -65,6 +65,6 @@ def missing_parameter(exception) end def invalid_record(resource) - render json: resource.record.errors, status: :unprocessable_entity + render json: resource.record.errors, status: :unprocessable_content end end