diff --git a/src/main/java/com/meta/cp4m/message/WAMessageHandler.java b/src/main/java/com/meta/cp4m/message/WAMessageHandler.java index 48e45c9..db42b3f 100644 --- a/src/main/java/com/meta/cp4m/message/WAMessageHandler.java +++ b/src/main/java/com/meta/cp4m/message/WAMessageHandler.java @@ -232,7 +232,7 @@ public List> routeDetails() { try { payload = MAPPER.readValue(bodyString, WebhookPayload.class); return Optional.of(payload); - } catch (Exception e) { + } catch (Throwable e) { LOGGER.atWarn().setCause(e).log("unable to parse payload"); return Optional.empty(); } diff --git a/src/main/java/com/meta/cp4m/message/webhook/whatsapp/Status.java b/src/main/java/com/meta/cp4m/message/webhook/whatsapp/Status.java index a383e9a..8767ed6 100644 --- a/src/main/java/com/meta/cp4m/message/webhook/whatsapp/Status.java +++ b/src/main/java/com/meta/cp4m/message/webhook/whatsapp/Status.java @@ -78,7 +78,8 @@ public int hashCode() { public enum StatusType { DELIVERED, READ, - SENT; + SENT, + FAILED; public String toString() { return this.name().toLowerCase();