]> git.openstreetmap.org Git - rails.git/commitdiff
Rethrow ActionController::UnknownAction exceptions encountered by
authorTom Hughes <tom@compton.nu>
Fri, 26 Feb 2010 15:27:52 +0000 (15:27 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 26 Feb 2010 15:27:52 +0000 (15:27 +0000)
the API so that rails handles them in the normal way and shows
the 404 page to the user. Closes #1989.

app/controllers/application_controller.rb

index 6750b5d8e2b7487874fbc180c35b941e0986fabb..0c41170470c3d9b1054be5cb8e4c61a55e3a3b77 100644 (file)
@@ -192,6 +192,8 @@ class ApplicationController < ActionController::Base
       report_error message, :bad_request
     rescue OSM::APIError => ex
       report_error ex.message, ex.status
+    rescue ActionController::UnknownAction => ex
+      raise
     rescue Exception => ex
       logger.info("API threw unexpected #{ex.class} exception: #{ex.message}")
       ex.backtrace.each { |l| logger.info(l) }