From 4af780eb42015a0d784a36672fa85e5432796bbe Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 1 Jun 2026 14:17:52 -0500 Subject: [PATCH] fix unreachable error branch in fetchConversation causing silent failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit openapi-fetch returns either `{ data }` or `{ error }`, never both. The previous guard checked `!data` first, so HTTP errors always hit that branch and returned early — the `error` toast was unreachable. Failed conversation loads now surface to the user instead of failing silently. Co-Authored-By: John Chilton --- client/src/components/GalaxyAI.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/components/GalaxyAI.vue b/client/src/components/GalaxyAI.vue index e52012848b0..cac358d61b6 100644 --- a/client/src/components/GalaxyAI.vue +++ b/client/src/components/GalaxyAI.vue @@ -281,12 +281,13 @@ async function fetchConversation(exchangeId: string) { }, }); - if (!fullConversation || fullConversation.length === 0) { - return; - } else if (error) { + if (error) { Toast.error(errorMessageAsString(error, "Failed to load conversation."), "Error loading conversation"); return; } + if (!fullConversation || fullConversation.length === 0) { + return; + } messages.value = fullConversation.map((msg: any, index: number) => { const message: ChatMessage = {