Skip to content

Replace deprecated :unprocessable_entity with :unprocessable_content - #297

Merged
rsmoke merged 1 commit into
stagingfrom
cursor/replace-unprocessable-entity-6382
Nov 10, 2026
Merged

rsmoke merged 1 commit into
stagingfrom
cursor/replace-unprocessable-entity-6382

Conversation

@rsmoke

@rsmoke rsmoke commented Nov 10, 2026

Copy link
Copy Markdown
Member

This is a Rack deprecation rename. :unprocessable_entity is the obsolete status symbol; :unprocessable_content is the name Rack uses for the same response. The HTTP status stays 422. Numeric 422 checks were left as they are.

The symbol was updated in:

  • Controllers: render / head status: :unprocessable_entity across the controllers under app/controllers/ (validation failures and JSON error responses).
  • Specs: have_http_status(:unprocessable_entity) in spec/controllers/bulk_judging_windows_controller_spec.rb. Other specs already expected :unprocessable_content.
  • Devise: config.responder.error_status in config/initializers/devise.rb.

A repo search after the change finds no remaining :unprocessable_entity.

Test plan

  • spec/controllers/bulk_judging_windows_controller_spec.rb (9 examples, 0 failures), including the four 422 examples.
  • Related controller and request specs that exercise the renamed status (application questions, awards, bulk contest instances, categories, contest descriptions, contest instances, entries, entry awards, entry rankings, judging rounds, profiles, assignments). 253 examples, 9 failures. The failures are GET pages that render the layout and cannot find compiled application.css in this environment. None of them are the 422 status examples.
  • Full suite was not run. Test boot needs MySQL, and config/storage.yml reads the GCS credentials path while loading Active Storage config. Test uploads still use the Disk service.
Open in Web Open in Cursor 

Rack still maps this status symbol to HTTP 422. The rename clears the
rspec-rails have_http_status deprecation without changing responses.

Co-authored-by: rsmoke <rsmoke@umich.edu>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the migration from the deprecated status symbol to :unprocessable_content.

No open issues 🎉

What changed in this PR

Replaces Rack’s deprecated :unprocessable_entity symbol with :unprocessable_content across the Rails application, preserving HTTP 422 responses.

Changes:

  • Updates validation and error responses in 24 controllers.
  • Aligns Devise’s responder error status with the replacement symbol.
  • Updates four bulk judging window spec expectations; numeric 422 checks remain unchanged.
File Description
spec/​controllers/​bulk_judging_windows_controller_spec.rb Updates four 422 status expectations.
config/​initializers/​devise.rb Updates the responder error status.
app/​controllers/​visibilities_controller.rb Renames create/update error statuses.
app/​controllers/​schools_controller.rb Renames create/update error statuses.
app/​controllers/​roles_controller.rb Renames create/update error statuses.
app/​controllers/​profiles_controller.rb Renames create/update error statuses.
app/​controllers/​judging_rounds_controller.rb Updates validation and ranking error statuses.
app/​controllers/​entry_rankings_controller.rb Updates creation and assignment error statuses.
app/​controllers/​entry_awards_controller.rb Updates award frame error statuses.
app/​controllers/​entries_controller.rb Updates HTML, JSON, and Turbo error statuses.
app/​controllers/​editable_contents_controller.rb Updates the edit error status.
app/​controllers/​departments_controller.rb Renames create/update error statuses.
app/​controllers/​contest_instances_controller.rb Renames create/update error statuses.
app/​controllers/​contest_descriptions_controller.rb Updates HTML and Turbo error statuses.
app/​controllers/​containers_controller.rb Updates HTML and Turbo error statuses.
app/​controllers/​class_levels_controller.rb Renames create/update error statuses.
app/​controllers/​categories_controller.rb Renames create/update error statuses.
app/​controllers/​campuses_controller.rb Renames create/update error statuses.
app/​controllers/​bulk_judging_windows_controller.rb Updates bulk judging window error statuses.
app/​controllers/​bulk_contest_instances_controller.rb Updates bulk creation error statuses.
app/​controllers/​bulk_contest_instance_activations_controller.rb Updates bulk activation error statuses.
app/​controllers/​awards_controller.rb Renames create/update error statuses.
app/​controllers/​assignments_controller.rb Updates HTML and Turbo creation error statuses.
app/​controllers/​application_questions_controller.rb Updates save and reorder error statuses.
app/​controllers/​addresses_controller.rb Renames create/update error statuses.
app/​controllers/​address_types_controller.rb Renames create/update error statuses.

Review effort: Balanced

@rsmoke
rsmoke merged commit c3d31b8 into staging Nov 10, 2026
7 checks passed
@rsmoke
rsmoke deleted the cursor/replace-unprocessable-entity-6382 branch November 10, 2026 20:00
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 this pull request may close these issues.

3 participants