From 6f16896a2c42c6c82099ffb1655f89137c3859a6 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 24 Mar 2016 10:10:53 +0800 Subject: [PATCH] FIX: Better logging when badges fail to backfill. --- app/services/badge_granter.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/services/badge_granter.rb b/app/services/badge_granter.rb index 7655329d403..8d1e11d824f 100644 --- a/app/services/badge_granter.rb +++ b/app/services/badge_granter.rb @@ -317,7 +317,9 @@ class BadgeGranter end badge.reset_grant_count! - + rescue => ex + Rails.logger.error("Failed to backfill '#{badge.type}' badge: #{opts}") + raise ex end