From 263c495b78e316022d920c4773178df2da97a965 Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Thu, 30 Jul 2020 14:37:22 -0400 Subject: [PATCH] Prefent refresh loop --- app/src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/api.ts b/app/src/api.ts index c0fc74be69..ba35387dc2 100644 --- a/app/src/api.ts +++ b/app/src/api.ts @@ -53,7 +53,7 @@ export const onError = async (error: RequestError) => { /* istanbul ignore next */ const code = error.response?.data?.error?.code; - if (status === 401 && code === 'INVALID_CREDENTIALS' && error.response?.config?.url !== '/auth/refresh') { + if (status === 401 && code === 'INVALID_CREDENTIALS' && error.response?.config?.url?.includes('refresh') === false) { try { await refresh();