From 66a9acbcce291362da292cc2a9fc8366bcdf8f95 Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Thu, 12 May 2022 15:19:51 +0500 Subject: [PATCH] updated bugsnag log message for accessToken injection failure --- src/config/ecencyApi.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config/ecencyApi.ts b/src/config/ecencyApi.ts index 7402c93a1..b6c7227cd 100644 --- a/src/config/ecencyApi.ts +++ b/src/config/ecencyApi.ts @@ -45,8 +45,9 @@ api.interceptors.request.use((request) => { request.data.code = accessToken; console.log('Added access token:', accessToken); } else { - console.warn("Failed to inject accessToken") - bugsnagInstance.notify(new Error(`Failed to inject accessToken in api call`)) + const isLoggedIn = state.application.isLoggedIn; + console.warn("Failed to inject accessToken", `isLoggedIn:${isLoggedIn}`) + bugsnagInstance.notify(new Error(`Failed to inject accessToken in ${request.url} call. isLoggedIn:${isLoggedIn}`)) } return request;