diff --git a/src/app/pages/client/ClientRoot.tsx b/src/app/pages/client/ClientRoot.tsx index 621d72809..42dea872f 100644 --- a/src/app/pages/client/ClientRoot.tsx +++ b/src/app/pages/client/ClientRoot.tsx @@ -60,6 +60,9 @@ const log = createLogger('ClientRoot'); const SESSION_SWITCH_KEY = 'sable-session-switch'; +const errorMessage = (error: unknown): string => + error instanceof Error ? error.message : String(error); + const isClientReady = (syncState: string | null): boolean => syncState === 'PREPARED' || syncState === 'SYNCING' || syncState === 'CATCHUP'; @@ -509,10 +512,10 @@ export function ClientRoot({ children }: ClientRootProps) { ) : ( - {`Failed to load. ${loadState.error.message}`} + {`Failed to load. ${errorMessage(loadState.error)}`} ))} {startState.status === AsyncStatus.Error && ( - {`Failed to start. ${startState.error.message}`} + {`Failed to start. ${errorMessage(startState.error)}`} )} {!legacyCryptoUpgradeRequired && (