Fixes silent error handling in Graph commit message generation#5368
Draft
sergeibbb wants to merge 1 commit into
Draft
Fixes silent error handling in Graph commit message generation#5368sergeibbb wants to merge 1 commit into
sergeibbb wants to merge 1 commit into
Conversation
Shows an error notification when Graph commit details 'Generate Commit Message' fails with an untyped provider error (e.g. Copilot credit limit). Previously, generic Error objects were caught and logged but never surfaced to the user — matching the SCM panel's existing behavior. Adds 'Provider Error' and 'Provider Unavailable' AI simulator modes for reproducing untyped provider failures in debug builds. Closes #89 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ca57ab6 to
1c3f4a3
Compare
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.
Summary
Provider ErrorandProvider UnavailableAI simulator modes for reproducing untyped provider failures in debug buildsCloses gitkraken/vscode-gitlens-private#89
Approach
Implemented (Option A — targeted fix): Added
showGenericErrorMessage()to the Graph'sgenerateCommitMessagecatch block ingraphWebview.ts, matching the existing SCM command behavior ingenerateCommitMessage.ts.Alternative considered (Option B — systemic fix): Add a fallback notification in
sendRequest()ataiProviderService.ts:1632-1644for all unclassified errors before rethrowing, so no caller has to handle it individually. This would cover all current and future AI surfaces (Graph, SCM, Composer, Review, etc.) but is a broader change in a critical path.Test plan
🤖 Generated with Claude Code