failed tests btw
This commit is contained in:
@@ -51,8 +51,10 @@ export function AuthProvider({ children }) {
|
||||
setLoading(false);
|
||||
})
|
||||
.catch((err) => {
|
||||
const status = err instanceof ApiError ? err.status : err?.status;
|
||||
if (status !== 401) {
|
||||
const status = ApiError && err instanceof ApiError ? err.status : err?.status;
|
||||
const message = typeof err?.message === "string" ? err.message : "";
|
||||
const isUnauthorized = status === 401 || message.includes("401");
|
||||
if (!isUnauthorized) {
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user