fix(core): add error boundary for workspace layout (#5014)

https://github.com/toeverything/AFFiNE/assets/3468483/d478bf4f-2be3-4d7d-8d94-aa95c1f74c8e
This commit is contained in:
LongYinan
2023-11-22 01:52:45 +00:00
committed by LongYinan
parent 3839a9bd15
commit 5f1a124b53
4 changed files with 31 additions and 13 deletions

View File

@@ -60,7 +60,7 @@ export function useCurrentUser(): CheckedUser {
// login succeed but the session request failed then.
// also need a error boundary to handle this error.
throw new SessionFetchErrorRightAfterLoginOrSignUp(
'First session should not be null',
'Fetching session failed',
() => {
getSession()
.then(session => {