From 4be8d03ddbefe0459ee7888aa485e0ef8fa77dcf Mon Sep 17 00:00:00 2001 From: Venkata Molluru Date: Tue, 2 Nov 2021 18:56:23 +0000 Subject: Exception handling to continue with other events Issue-ID: HOLMES-489 Signed-off-by: Venkata Molluru Change-Id: I7a7dde6df674f70a653f3511bc5257e51d877df0 (cherry picked from commit 250751bc1942dfa15b8f24bbc2576ab9ab5c55fd) --- .../main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java b/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java index 8c3d4f5..af772fb 100644 --- a/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java +++ b/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java @@ -88,8 +88,13 @@ public class Subscriber { private List extractVesAlarm(List responseEntity) { List vesAlarmList = new ArrayList<>(); for (String entity : responseEntity) { - vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity)); - } + try { + vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity)); + } catch (Exception e) { + log.error("Failed to convert the response data to VES alarm ", e); + //Continue with other events + } + } return vesAlarmList; } } -- cgit 1.2.3-korg