From 10a13bcf7f987de45540b52d414883664e43f9cd Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:48:03 +0530 Subject: [PATCH] fix: add optional chaining for error message in network handler of Intercom (#2648) fix bugsnag issue --- src/v0/destinations/campaign_manager/networkHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v0/destinations/campaign_manager/networkHandler.js b/src/v0/destinations/campaign_manager/networkHandler.js index a80fff6fe4..cd98de253e 100644 --- a/src/v0/destinations/campaign_manager/networkHandler.js +++ b/src/v0/destinations/campaign_manager/networkHandler.js @@ -52,7 +52,7 @@ const responseHandler = (destinationResponse) => { } throw new NetworkError( - `Campaign Manager: ${response.error.message} during CAMPAIGN_MANAGER response transformation 3`, + `Campaign Manager: ${response.error?.message} during CAMPAIGN_MANAGER response transformation 3`, status, { [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status),