Merge pull request #5187 from BerriAI/litellm_handle_session_expired_ui

[Feat-UI] - Handle session expired on UI
This commit is contained in:
Ishaan Jaff
2024-08-13 17:15:23 -07:00
committed by GitHub
@@ -29,6 +29,7 @@ const handleError = async (errorData: string) => {
message.info("UI Session Expired. Logging out.");
lastErrorTime = currentTime;
await sleep(3000); // 5 second sleep
document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
window.location.href = baseUrl;
} else {
message.error(errorData);