killbill-memoizeit

analytics: don't fail the refresh for catalog errors in bii This

4/18/2013 9:43:15 PM

Details

diff --git a/osgi-bundles/bundles/analytics/src/main/java/com/ning/billing/osgi/bundles/analytics/BusinessAnalyticsBase.java b/osgi-bundles/bundles/analytics/src/main/java/com/ning/billing/osgi/bundles/analytics/BusinessAnalyticsBase.java
index 72cd3e0..389e766 100644
--- a/osgi-bundles/bundles/analytics/src/main/java/com/ning/billing/osgi/bundles/analytics/BusinessAnalyticsBase.java
+++ b/osgi-bundles/bundles/analytics/src/main/java/com/ning/billing/osgi/bundles/analytics/BusinessAnalyticsBase.java
@@ -320,8 +320,8 @@ public abstract class BusinessAnalyticsBase {
             final Catalog catalog = getCatalog(context);
             return catalog.findPlan(invoiceItem.getPlanName(), invoiceItem.getStartDate().toDateTimeAtStartOfDay());
         } catch (CatalogApiException e) {
-            logService.log(LogService.LOG_WARNING, "Unable to retrieve plan for invoice item " + invoiceItem.getId(), e);
-            throw new AnalyticsRefreshException(e);
+            logService.log(LogService.LOG_INFO, "Unable to retrieve plan for invoice item " + invoiceItem.getId(), e);
+            return null;
         }
     }
 
@@ -332,8 +332,8 @@ public abstract class BusinessAnalyticsBase {
             final Catalog catalog = getCatalog(context);
             return catalog.findPhase(invoiceItem.getPhaseName(), invoiceItem.getStartDate().toDateTimeAtStartOfDay(), subscription.getStartDate());
         } catch (CatalogApiException e) {
-            logService.log(LogService.LOG_WARNING, "Unable to retrieve phase for invoice item " + invoiceItem.getId(), e);
-            throw new AnalyticsRefreshException(e);
+            logService.log(LogService.LOG_INFO, "Unable to retrieve phase for invoice item " + invoiceItem.getId(), e);
+            return null;
         }
     }