Skip to content

fix: surface agent action errors to users - #646

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/agent-api-error-toasts
Aug 4, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
BharadwajKanneveti:fix/agent-api-error-toasts

Conversation

@BharadwajKanneveti

Copy link
Copy Markdown
Contributor

Summary

Improve error handling in agent chat actions by surfacing API failures instead of silently returning.

Changes:

  • Added error response handling for newChat when conversation creation fails.
  • Added error response handling for deleteConversation when deletion fails.
  • Added error handling for message submission failures in onSubmit.
  • Display toast.error(...) messages using the API-provided error with fallback messages.
  • Preserve the user's typed message when sending fails by only clearing the input after a successful send.

Related issue

Closes #551

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three silent paths covered, and preserving the typed message on a failed send is a great detail. Thanks!

@gkhngyk
gkhngyk merged commit 6c88110 into ansvisor:main Aug 4, 2026
4 checks passed
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.

AI Agent page: failed requests give no feedback — new chat, delete conversation, and send message fail silently

2 participants