Improve error reporting with descriptive, type-aware error messages#74
Merged
RichardAtCT merged 3 commits intomainfrom Feb 21, 2026
Merged
Improve error reporting with descriptive, type-aware error messages#74RichardAtCT merged 3 commits intomainfrom
RichardAtCT merged 3 commits intomainfrom
Conversation
Replace generic "Failed to send response" and truncated error messages with specific, actionable error messages based on exception type. Users now see exactly what went wrong (timeout, MCP failure, auth error, overload, connection issue, etc.) along with concrete recovery steps. Key changes: - Refactor _format_error_message() to accept exception objects and dispatch on exception type (ClaudeTimeoutError, ClaudeMCPError, ClaudeParsingError, ClaudeSessionError, ClaudeProcessError) - Add keyword-based fallback for overloaded, auth, connection, and CLI-not-found errors - Increase error truncation limit from 200 to 500 chars - Replace "Failed to send response" with actual Telegram error details - Update all callers in orchestrator.py and message.py to pass exception objects instead of strings https://claude.ai/code/session_012YYSfNJ2MRE7vktviZ7hJz
|
PR Review Summary
What looks good
Issues / questions
Suggested tests (if needed)
Verdict
|
…atching, raw fallback - Guard ClaudeError catch-all so ClaudeToolValidationError (and future subtypes) are not downgraded to generic "process error" - Tighten keyword predicates to match known SDK prefixes (e.g. "failed to connect to claude", "mcp server", "claude code not found") instead of loose substring matching that could misclassify user content - Unknown/unmatched errors now show the raw error message directly - Revert unrelated poetry.lock changes https://claude.ai/code/session_012YYSfNJ2MRE7vktviZ7hJz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace generic "Failed to send response" and truncated error messages
with specific, actionable error messages based on exception type. Users
now see exactly what went wrong (timeout, MCP failure, auth error,
overload, connection issue, etc.) along with concrete recovery steps.
Key changes:
dispatch on exception type (ClaudeTimeoutError, ClaudeMCPError,
ClaudeParsingError, ClaudeSessionError, ClaudeProcessError)
CLI-not-found errors
exception objects instead of strings
https://claude.ai/code/session_012YYSfNJ2MRE7vktviZ7hJz