Skip to content

Commit ef2e7b7

Browse files
committed
Use 504 gateway timeout for rack-timeout errors
1 parent e2e8737 commit ef2e7b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/application_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ class ApplicationController < ActionController::Base
4343
end
4444

4545
rescue_from Rack::Timeout::RequestTimeoutException do |exception|
46-
respond_with_error('Request timed out', 503, exception) # status code 408 would be the correct status code, but when receiving 408 Firefox retries 10 times and then states the connection was reset instead of showing our error
46+
respond_with_error('Request timed out', 504, exception) # status code 408 would be the correct status code, but when receiving 408 Firefox retries 10 times and then states the connection was reset instead of showing our error
4747
end
4848

4949
rescue_from Rack::Timeout::RequestTimeoutError do |exception|
50-
respond_with_error('Request timed out', 503, exception) # status code 408 would be the correct status code, but when receiving 408 Firefox retries 10 times and then states the connection was reset instead of showing our error
50+
respond_with_error('Request timed out', 504, exception) # status code 408 would be the correct status code, but when receiving 408 Firefox retries 10 times and then states the connection was reset instead of showing our error
5151
end
5252

5353
before_action :set_default_url_options

0 commit comments

Comments
 (0)