Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Make unacceptable actually return a 422 status code, since it returns the 422.html page

Cyril Rohrce5fa0597f0a
diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb
index 5b6fcbcce10..a77c402c80f 100644
--- a/app/controllers/errors_controller.rb
+++ b/app/controllers/errors_controller.rb
@@ -10,9 +10,10 @@ class ErrorsController < ApplicationController
render_404
end
+ # this may be called on CSRF validation failure
def unacceptable
render file: "#{Rails.public_path.join('422.html')}",
- status: :not_acceptable,
+ status: :unprocessable_entity,
layout: false
end