From 97769170fde23c0bd113cff47cbd2977c727d180 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 21 May 2009 10:02:26 +0000 Subject: [PATCH] Give the API error handler a generic rescue that returns 500 with the exception details. --- app/controllers/application.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/application.rb b/app/controllers/application.rb index f166df21d..2f8bd776d 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -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 -- 2.39.5