Merge pull request #2042 from ecency/nt/reporting-token-intercept

NT - Notify Token Inject Failure
This commit is contained in:
Feruz M 2021-08-16 15:13:54 +03:00 committed by GitHub
commit 081e8db658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ import { get } from 'lodash';
import { store } from '../redux/store/store';
import { getDigitPinCode } from '../providers/hive/dhive';
import { decryptKey } from '../utils/crypto';
import bugsnagInstance from '../config/bugsnag';
const api = axios.create({
baseURL: Config.ECENCY_BACKEND_API,
@ -39,6 +40,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`))
}
return request;