Skip to content

chat: surface generic error messages instead of raw technical strings#54

Merged
Anton-Horn merged 2 commits into
mainfrom
chat-generic-errors
Jun 9, 2026
Merged

chat: surface generic error messages instead of raw technical strings#54
Anton-Horn merged 2 commits into
mainfrom
chat-generic-errors

Conversation

@Anton-Horn

Copy link
Copy Markdown
Contributor

Summary

Chat errors arrived from the server as raw err.message strings and were rendered verbatim in red at the inline assistant-error site (MessageView.tsx). This replaces those technical strings with short, generic, user-facing text.

  • New helper web/src/lib/error-messages.tsfriendlyErrorMessage(raw) maps any raw error to a short, non-technical line. Defaults to a single generic message and recognizes a few broad, jargon-free categories: busy/overload, network, timeout, context-window, auth.
  • MessageView.tsx — inline error now renders friendlyErrorMessage(message.errorMessage) instead of the raw string. Abort handling untouched.
  • MessageList.tsx — the global banner routes error.message through the same helper so the two render sites stay consistent.

Raw errors are still logged server-side (ws-chat.ts), so nothing diagnostic is lost — only the user-facing display is now generic.

Tool/subagent error output cards are intentionally left as-is (collapsible diagnostic output, not the chat-level error surface).

Test plan

  • bunx tsc --noEmit passes in web/

Chat errors arrived from the server as raw `err.message` strings and were
rendered verbatim in red at the inline assistant-error site. Add a
friendlyErrorMessage helper that maps any raw error to a short, non-technical
line (with a few broad actionable categories: busy/network/timeout/context/auth)
and apply it at both the inline error and the global banner so the two stay
consistent. Raw errors are still logged server-side.
@Anton-Horn Anton-Horn merged commit 7384a30 into main Jun 9, 2026
1 check passed
@Anton-Horn Anton-Horn deleted the chat-generic-errors branch June 9, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant