fix: handle user/not_found response from backend (#72)

This commit is contained in:
Akash K
2023-04-07 03:19:18 +05:30
committed by GitHub
parent 13aa456c3c
commit a33337ae0c

View File

@@ -99,6 +99,12 @@ async function setInitialUser() {
return
}
if (error && error.message === "user/not_found") {
setUser(null)
isGettingInitialUser.value = false
return
}
// cookies sent, but it is expired, we need to refresh the token
if (error && error.message === "Unauthorized") {
const isRefreshSuccess = await refreshToken()