From 491eb07feadaa409255a7591541784e66c8f8c61 Mon Sep 17 00:00:00 2001 From: Christomatt Date: Thu, 29 Jan 2026 00:08:29 +0100 Subject: [PATCH] fix: Validate user object before accessing DID and clarify error message for missing identity. --- src/app/chat/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/chat/page.tsx b/src/app/chat/page.tsx index 86802ca..cae2739 100644 --- a/src/app/chat/page.tsx +++ b/src/app/chat/page.tsx @@ -150,7 +150,7 @@ export default function ChatPage() { if (!did) throw new Error('User not found'); } - if (!user.did) throw new Error('User DID missing'); + if (!user || !user.did) throw new Error('User identity not loaded or DID missing');