forked from phoenix/litellm-mirror
ui - handle session expired on ui
This commit is contained in:
parent
cdce13434e
commit
d85762b32f
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ const handleError = async (errorData: string) => {
|
||||||
message.info("UI Session Expired. Logging out.");
|
message.info("UI Session Expired. Logging out.");
|
||||||
lastErrorTime = currentTime;
|
lastErrorTime = currentTime;
|
||||||
await sleep(3000); // 5 second sleep
|
await sleep(3000); // 5 second sleep
|
||||||
|
document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||||
window.location.href = baseUrl;
|
window.location.href = baseUrl;
|
||||||
} else {
|
} else {
|
||||||
message.error(errorData);
|
message.error(errorData);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue