-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Description
When the LLM call fails, the raw Go error chain is sent directly to the user in chat. Users see internal error details like HTTP status codes, wrapped error contexts, and Go error formatting.
Current Behavior
Error processing message: LLM call failed after retries: status 401: Unauthorized
This appears in Telegram, Discord, Slack, and all other channels.
Expected Behavior
Users should see a friendly, actionable message:
- Auth errors:
"I couldn't process that — please check your API key in ~/.picoclaw/config.json" - Rate limits:
"I'm being rate-limited. Please try again in a moment." - Network errors:
"I couldn't reach the AI provider. Check your internet connection." - Generic:
"Something went wrong. Run 'picoclaw doctor' to diagnose."
Raw errors should be logged server-side only.
Location
pkg/agent/loop.go:161—response = fmt.Sprintf("Error processing message: %v", err)
Fix
Add an error classification layer between the agent loop and the user-facing response. Map common error types (401, 429, network timeout, context exceeded) to friendly messages. Log the full error with logger.ErrorCF.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels