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:
parent
ba1ecf61f3
commit
2df3a8d2e2
1 changed files with 2 additions and 0 deletions
|
@ -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) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue