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