mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 13:25:11 +00:00
Fix handling 403 forbidden error from auth response
This commit is contained in:
@@ -23,6 +23,10 @@ export function useAuthenticatedData() {
|
|||||||
revalidateOnFocus: false,
|
revalidateOnFocus: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (data?.detail === "Forbidden") {
|
||||||
|
return { data: null, error: "Forbidden", isLoading: false };
|
||||||
|
}
|
||||||
|
|
||||||
return { data, error, isLoading };
|
return { data, error, isLoading };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user