From: Tom Hughes Date: Fri, 26 Feb 2010 15:27:52 +0000 (+0000) Subject: Rethrow ActionController::UnknownAction exceptions encountered by X-Git-Tag: live~7330^2~10 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2df3a8d2e25460b1eef06c9189f2677833cbdcac Rethrow ActionController::UnknownAction exceptions encountered by the API so that rails handles them in the normal way and shows the 404 page to the user. Closes #1989. --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6750b5d8e..0c4117047 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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) }