Give the API error handler a generic rescue that returns 500 with
the exception details.
This commit is contained in:
parent
e3cbeeae94
commit
97769170fd
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue