API: on error, include backtrace in json response.
Incidentally fixes issue with error responses inside /sources.json not
including the usual `{"success": false}`.
This commit is contained in:
@@ -9,14 +9,4 @@ class SourcesController < ApplicationController
|
||||
format.xml { render xml: @source.to_h.to_xml(root: "source") }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def rescue_exception(exception)
|
||||
respond_with do |format|
|
||||
format.json do
|
||||
render :json => {:message => exception.to_s, :backtrace => exception.backtrace}, :status => :error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user