From cd0d97ec2dba2d36796985937b04264e97087296 Mon Sep 17 00:00:00 2001 From: Beppe Catanese <1771700+gcatanese@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:27:28 +0200 Subject: [PATCH] Log parsing error (#1361) Co-authored-by: Djoyke Reijans <115019123+DjoykeAbyah@users.noreply.github.com> --- .../java/com/adyen/notification/BankingWebhookHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/adyen/notification/BankingWebhookHandler.java b/src/main/java/com/adyen/notification/BankingWebhookHandler.java index bb2cb562d..fe374f472 100644 --- a/src/main/java/com/adyen/notification/BankingWebhookHandler.java +++ b/src/main/java/com/adyen/notification/BankingWebhookHandler.java @@ -11,8 +11,12 @@ import com.adyen.model.transferwebhooks.TransferNotificationRequest; import com.adyen.model.transactionwebhooks.TransactionNotificationRequestV4; import java.util.Optional; +import java.util.logging.Logger; public class BankingWebhookHandler { + + private static final Logger LOG = Logger.getLogger(BankingWebhookHandler.class.getName()); + private final String payload; public BankingWebhookHandler(String payload) { @@ -59,6 +63,7 @@ private Optional getOptionalField(Class clazz) { T val = JSON.getMapper().readValue(payload, clazz); return Optional.ofNullable(val); } catch (Exception e) { + LOG.warning("Deserialization error: " + e.getMessage()); return Optional.empty(); } }