projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix status name
[arvados.git]
/
app
/
controllers
/
application_controller.rb
diff --git
a/app/controllers/application_controller.rb
b/app/controllers/application_controller.rb
index 5b88277ac9fb687115aa3e61d39d9ce5d27bf20a..493db3cc1bfe6661a8a2120ee78705a4f9b49ffd 100644
(file)
--- a/
app/controllers/application_controller.rb
+++ b/
app/controllers/application_controller.rb
@@
-17,6
+17,8
@@
class ApplicationController < ActionController::Base
end
def render_error(e)
end
def render_error(e)
+ logger.error e.inspect
+ logger.error e.backtrace.collect { |x| x + "\n" }.join('') if e.backtrace
if @object and @object.errors and @object.errors.full_messages
errors = @object.errors.full_messages
else
if @object and @object.errors and @object.errors.full_messages
errors = @object.errors.full_messages
else
@@
-25,7
+27,8
@@
class ApplicationController < ActionController::Base
render json: { errors: errors }, status: 422
end
render json: { errors: errors }, status: 422
end
- def render_not_found
+ def render_not_found(e=ActionController::RoutingError.new("Path not found"))
+ logger.error e.inspect
render json: { errors: ["Path not found"] }, status: 401
end
render json: { errors: ["Path not found"] }, status: 401
end
@@
-71,7
+74,6
@@
class ApplicationController < ActionController::Base
end
def find_object_by_uuid
end
def find_object_by_uuid
- logger.info params.inspect
if params[:id] and params[:id].match /\D/
params[:uuid] = params.delete :id
end
if params[:id] and params[:id].match /\D/
params[:uuid] = params.delete :id
end