Skip to content

Fixes silent error handling in Graph commit message generation#5368

Draft
sergeibbb wants to merge 1 commit into
mainfrom
bug/89-graph-silent-error-handling
Draft

Fixes silent error handling in Graph commit message generation#5368
sergeibbb wants to merge 1 commit into
mainfrom
bug/89-graph-silent-error-handling

Conversation

@sergeibbb

Copy link
Copy Markdown
Member

Summary

  • Shows an error notification when Graph commit details "Generate Commit Message" fails with an untyped provider error (e.g. Copilot credit limit)
  • Adds Provider Error and Provider Unavailable AI simulator modes for reproducing untyped provider failures in debug builds

Closes gitkraken/vscode-gitlens-private#89

Approach

Implemented (Option A — targeted fix): Added showGenericErrorMessage() to the Graph's generateCommitMessage catch block in graphWebview.ts, matching the existing SCM command behavior in generateCommitMessage.ts.

Alternative considered (Option B — systemic fix): Add a fallback notification in sendRequest() at aiProviderService.ts:1632-1644 for 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

  • Enable subscription simulator (Pro) and AI simulator (Provider Error mode)
  • Open Graph, select WIP, click sparkle "Generate Commit Message"
  • Verify error notification is now shown (previously silent)
  • Verify SCM panel "Generate Commit Message" still shows error notification
  • Verify typed AIError modes (Error, Quota) still show their specific notifications from both surfaces
  • Verify Provider Unavailable mode is silent on both surfaces (expected — no error to report)

🤖 Generated with Claude Code

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>
@sergeibbb sergeibbb force-pushed the bug/89-graph-silent-error-handling branch from ca57ab6 to 1c3f4a3 Compare July 7, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant