From 852f5c10bcc4e67adc31be7fd1dba6272826d297 Mon Sep 17 00:00:00 2001 From: Jordan Brough Date: Thu, 8 Jan 2015 10:46:49 -0700 Subject: [PATCH] Log response summaries for error responses For all response codes >= 400, even when there is no exception involved. fixes #61 --- app/controllers/spree/wombat/webhook_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/spree/wombat/webhook_controller.rb b/app/controllers/spree/wombat/webhook_controller.rb index 0d46d77..807f509 100644 --- a/app/controllers/spree/wombat/webhook_controller.rb +++ b/app/controllers/spree/wombat/webhook_controller.rb @@ -46,6 +46,9 @@ def render_responder(responder) error_notifier.call(responder) end end + if responder.code >= 400 + logger.info "responder_summary=#{responder.summary.inspect}" + end render( json: ResponderSerializer.new(responder, root: false), status: responder.code