Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

FIX: Alert message appears when the app is loaded initially (#640)

Tahier Hussain795134f84141
diff --git a/frontend/src/hooks/useSessionValid.js b/frontend/src/hooks/useSessionValid.js
index 30264b47c..3b00861f7 100644
--- a/frontend/src/hooks/useSessionValid.js
+++ b/frontend/src/hooks/useSessionValid.js
@@ -38,6 +38,12 @@ function useSessionValid() {
return async () => {
try {
const userSessionData = await userSession();
+
+ // Return if the user is not authenticated
+ if (!userSessionData) {
+ return;
+ }
+
const signedInOrgId = userSessionData?.organization_id;
// API to get the list of organizations