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.
This commit is contained in:
Tom Hughes 2010-02-26 15:27:52 +00:00
parent ba1ecf61f3
commit 2df3a8d2e2

View 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) }