|
|
|
@ -11,7 +11,7 @@ import { UserFingerprintGenerator } from '@/shared/helpers/fingerprint.helper'
@@ -11,7 +11,7 @@ import { UserFingerprintGenerator } from '@/shared/helpers/fingerprint.helper'
|
|
|
|
|
|
|
|
|
|
const store = () => GlobalContainerService.get('store') |
|
|
|
|
|
|
|
|
|
const axiosInstance = axios.create({ |
|
|
|
|
export const axiosInstance = axios.create({ |
|
|
|
|
baseURL: config.baseUrl, |
|
|
|
|
// headers: {
|
|
|
|
|
// 'Content-Type': 'application/json',
|
|
|
|
@ -60,7 +60,7 @@ const request = async <T>(
@@ -60,7 +60,7 @@ const request = async <T>(
|
|
|
|
|
return request(func, retryCount + 1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (getErrorCode(e) === 401 && tryAgainOnError) { |
|
|
|
|
if (getErrorCode(e) === 401 && tryAgainOnError && retryCount <= 2) { |
|
|
|
|
await authService.refreshSession() |
|
|
|
|
return (await func()) as any as AxiosResponse |
|
|
|
|
} |
|
|
|
|