diff --git a/src/services/userService.ts b/src/services/userService.ts index 03def608e..9d0f5b0f1 100644 --- a/src/services/userService.ts +++ b/src/services/userService.ts @@ -18,6 +18,7 @@ import { UserDetails, } from 'types/user'; import { getFamilyData, isPartOfFamily } from 'utils/billing'; +import { ServerErrorCodes } from 'utils/error'; const ENDPOINT = getEndpoint(); @@ -161,7 +162,12 @@ export const isTokenValid = async () => { } return true; } catch (e) { - return false; + logError(e, 'session-validity api call failed'); + if (e.status?.toString() === ServerErrorCodes.SESSION_EXPIRED) { + return false; + } else { + return true; + } } };