diff --git a/client/src/services/apiProxy.js b/client/src/services/apiProxy.js index ede39a7..79a3450 100644 --- a/client/src/services/apiProxy.js +++ b/client/src/services/apiProxy.js @@ -19,7 +19,7 @@ export async function request(path, params, autoLogoutOnAuthError = true) { if (!response.ok) { const {status, statusText} = response; - if (autoLogoutOnAuthError && status === 401) { + if (autoLogoutOnAuthError && status === 401 && token) { log.error('Logging out due to auth error', {status, statusText, path}); logout(); }