Optional chaining

This commit is contained in:
Chloe Herd 2026-01-13 10:26:43 -05:00
parent 3bfe0b2b43
commit 6ab6932fc5

View file

@ -423,7 +423,7 @@ export default {
const wasPaymentCancelled = error?.name === "CANCEL";
if (!wasPaymentCancelled) {
const stringToLog = `ADYEN ERROR. Name = ${error.name}. Details = ${error.message}.`;
const stringToLog = `ADYEN ERROR. Name = ${error?.name}. Details = ${error?.message}.`;
await global.$logger.logError(stringToLog);