Bug
When an agent job fails, the raw technical error message is shown directly in the chat UI:
agent job failed: error sending request for url (https://staging-api.alphahuman.xyz/openai/v1/chat/completions)
Expected behavior
- Technical error details (URLs, stack traces, internal service names) should never be shown to end users in the chat.
- Errors should be reported to Sentry automatically with full context (URL, status code, request ID, etc.).
- The chat should show a user-friendly message like:
- "Something went wrong. Please try again."
- "This error has been reported. You can also report it on Discord."
- Include a "Report on Discord" link/button.
Current behavior
Raw error strings including internal API URLs are displayed verbatim in the chat bubble.
Why this matters
- UX: Technical jargon is confusing and unhelpful for users.
- Security: Leaking internal API URLs and infrastructure details is an unnecessary exposure.
- Observability: Without Sentry capture, these errors are invisible to the team unless a user reports them manually.
Suggested approach
- In the agent execution path, catch errors and:
- Log/report to Sentry with full technical context.
- Surface a sanitized, user-friendly message in the chat.
- Consider a generic error boundary for all agent job results that strips technical details.
Bug
When an agent job fails, the raw technical error message is shown directly in the chat UI:
Expected behavior
Current behavior
Raw error strings including internal API URLs are displayed verbatim in the chat bubble.
Why this matters
Suggested approach