X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/841ebe80d7e62068e8c2813bbeb82ecfbfeb0607..e076d824bf6fd6d50ab609b2bbc33b450f1274cd:/app/controllers/browse_controller.rb diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index 5c7912d15..a77b0f94a 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -84,6 +84,12 @@ private SystemTimer.timeout_after(30) do yield end + rescue ActionView::TemplateError => ex + if ex.original_exception.is_a?(Timeout::Error) + render :action => "timeout", :status => :request_timeout + else + raise + end rescue Timeout::Error render :action => "timeout", :status => :request_timeout end