Skip to content

Commit

Permalink
Merge pull request #19796 from Tainan404/fix-invalid-session
Browse files Browse the repository at this point in the history
Fix: loading client with invalid session token
  • Loading branch information
antobinary committed Mar 19, 2024
2 parents 497c3a1 + 1b984d0 commit 2041d1c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect } from 'react';
import { Session } from 'meteor/session';
import { ErrorScreen } from '../../error-screen/component';
import LoadingScreen from '../../common/loading-screen/component';

Expand Down Expand Up @@ -69,6 +70,10 @@ const StartupDataFetch: React.FC<StartupDataFetchProps> = ({
setSettingsFetched(true);
clearTimeout(timeoutRef.current);
setLoading(false);
}).catch(() => {
Session.set('errorMessageDescription', 'meeting_ended');
setError('Error fetching startup data');
setLoading(false);
});
}, []);

Expand All @@ -79,6 +84,7 @@ const StartupDataFetch: React.FC<StartupDataFetchProps> = ({
? (
<ErrorScreen
endedReason={error}
code={403}
/>
)
: null}
Expand Down

0 comments on commit 2041d1c

Please sign in to comment.