updated bugsnag log message for accessToken injection failure

This commit is contained in:
Nouman Tahir 2022-05-12 15:19:51 +05:00
parent 50e7b4a8cc
commit 66a9acbcce

View File

@ -45,8 +45,9 @@ api.interceptors.request.use((request) => {
request.data.code = accessToken; request.data.code = accessToken;
console.log('Added access token:', accessToken); console.log('Added access token:', accessToken);
} else { } else {
console.warn("Failed to inject accessToken") const isLoggedIn = state.application.isLoggedIn;
bugsnagInstance.notify(new Error(`Failed to inject accessToken in api call`)) console.warn("Failed to inject accessToken", `isLoggedIn:${isLoggedIn}`)
bugsnagInstance.notify(new Error(`Failed to inject accessToken in ${request.url} call. isLoggedIn:${isLoggedIn}`))
} }
return request; return request;