1
0
Fork 0
forked from fedi/mastodon

Catching rack timeout from rails doesn't work

This commit is contained in:
Eugen Rochko 2017-04-02 21:12:18 +02:00
parent 5b12624847
commit 2d07cb5771
2 changed files with 0 additions and 13 deletions

View file

@ -12,7 +12,6 @@ class ApplicationController < ActionController::Base
rescue_from ActionController::RoutingError, with: :not_found
rescue_from ActiveRecord::RecordNotFound, with: :not_found
rescue_from ActionController::InvalidAuthenticityToken, with: :unprocessable_entity
rescue_from Rack::Timeout::RequestExpiryError, Rack::Timeout::RequestTimeoutError, with: :request_timeout
before_action :store_current_location, except: :raise_not_found, unless: :devise_controller?
before_action :set_locale
@ -70,13 +69,6 @@ class ApplicationController < ActionController::Base
end
end
def request_timeout
respond_to do |format|
format.any { head 503 }
format.html { render 'errors/503', layout: 'error', status: 503 }
end
end
def current_account
@current_account ||= current_user.try(:account)
end

View file

@ -1,5 +0,0 @@
- content_for :page_title do
Request timeout
- content_for :content do
It took too long to process your request. This might be a temporary server issue