Give the API error handler a generic rescue that returns 500 with

the exception details.
This commit is contained in:
Tom Hughes 2009-05-21 10:02:26 +00:00
parent e3cbeeae94
commit 97769170fd

View file

@ -115,6 +115,8 @@ class ApplicationController < ActionController::Base
rescue OSM::APIError => ex
render_opts = ex.render_opts
report_error render_opts[:text], render_opts[:status]
rescue Exception => ex
render :text => "#{ex.class}: #{ex.message}", :status => :internal_server_error
end
end