]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/browse_controller.rb
Make sure we report "no results" when Nominatim's reverse geocoder fails
[rails.git] / app / controllers / browse_controller.rb
index 5c7912d154ec12a73769c6a41d8ee9de4e5021db..a77b0f94a48f71939e16243282e27735bd0f9ac2 100644 (file)
@@ -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