Skip to content

Commit

Permalink
AO3-6911: return 504
Browse files Browse the repository at this point in the history
  • Loading branch information
boyer-victor committed Feb 25, 2025
1 parent d507d2a commit ec7dbd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def auth_error

def timeout_error
@page_subtitle = t(".subtitle")
render "timeout_error", status: 200, formats: :html
render "timeout_error", status: 504, formats: :html

Check warning on line 14 in app/controllers/errors_controller.rb

View workflow job for this annotation

GitHub Actions / Rubocop

[rubocop] reported by reviewdog 🐶 Prefer `:gateway_timeout` over `504` to define HTTP status code. Raw Output: app/controllers/errors_controller.rb:14:37: C: Rails/HttpStatus: Prefer `:gateway_timeout` over `504` to define HTTP status code.
end
end
2 changes: 1 addition & 1 deletion spec/controllers/errors_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
describe "GET #timeout_error" do
it "returns an HTML timeout error page" do
get :timeout_error
expect(response.status).to eq(200)
expect(response.status).to eq(504)
expect(response.header["Content-Type"]).to eq("text/html; charset=utf-8")
end
end
Expand Down

0 comments on commit ec7dbd7

Please sign in to comment.