AI Agent: raw JSON error shown to user when hero_logic is not running #10

Open
opened 2026-06-22 08:29:59 +00:00 by mahmoud · 0 comments
Owner

Messaging the AI Agent when its backend is down dumps the raw JSON-RPC response into the chat instead of a friendly message. Reproduced by sending "Hey":

{
  "answer": null,
  "attempts": 0,
  "duration_ms": 0,
  "error": "hero_logic is not running. Start it to use the agent feature.",
  "result": null,
  "script": "",
  "selected_services": [],
  "success": false
}

Expected: when success is false / error is set, render the error string as a normal agent message (e.g. a warning bubble), not the raw JSON object. Handle the not-running / error cases gracefully.


Found while testing the hero_browser Dioxus admin on current development, at /hero_components/admin/?service=hero_browser. Most of these are shell-level and affect every service, not just hero_browser.

Messaging the AI Agent when its backend is down dumps the raw JSON-RPC response into the chat instead of a friendly message. Reproduced by sending "Hey": ```json { "answer": null, "attempts": 0, "duration_ms": 0, "error": "hero_logic is not running. Start it to use the agent feature.", "result": null, "script": "", "selected_services": [], "success": false } ``` **Expected:** when `success` is false / `error` is set, render the `error` string as a normal agent message (e.g. a warning bubble), not the raw JSON object. Handle the not-running / error cases gracefully. --- *Found while testing the hero_browser Dioxus admin on current `development`, at `/hero_components/admin/?service=hero_browser`. Most of these are shell-level and affect every service, not just hero_browser.*
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_components#10
No description provided.