fix: handle user/not_found response from backend (#72)
This commit is contained in:
@@ -99,6 +99,12 @@ async function setInitialUser() {
|
|||||||
return
|
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
|
// cookies sent, but it is expired, we need to refresh the token
|
||||||
if (error && error.message === "Unauthorized") {
|
if (error && error.message === "Unauthorized") {
|
||||||
const isRefreshSuccess = await refreshToken()
|
const isRefreshSuccess = await refreshToken()
|
||||||
|
|||||||
Reference in New Issue
Block a user