Skip to content

fix(scope-recovery): log error in hasActiveOAuthGrant catch block - #1511

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
fix/scope-recovery-silent-catch
Draft

fix(scope-recovery): log error in hasActiveOAuthGrant catch block#1511
cursor[bot] wants to merge 1 commit into
mainfrom
fix/scope-recovery-silent-catch

Conversation

@cursor

@cursor cursor Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Bug

hasActiveOAuthGrant() in src/lib/scope-recovery.ts silently swallowed all exceptions from runtime.getAuthSource(). This violated the project's silent-catch prohibition and made it impossible to diagnose database errors that could prevent the OAuth scope recovery flow from activating.

Root cause

The catch block returned false without any logging, so failures in getAuthSource() (e.g. DB corruption, missing tables) were completely invisible even with --verbose.

Reproduction

Any database error during getAuthSource() would be silently swallowed, causing the CLI to skip OAuth scope recovery without any diagnostic output.

Fix

  • Added logger.debug() to the catch block so the error is visible with --verbose
  • Updated the silent-catch baseline to reflect the fix
Open in Web View Automation 

The hasActiveOAuthGrant function silently swallowed all exceptions from
runtime.getAuthSource(), making it impossible to diagnose database errors
that could prevent the OAuth scope recovery flow from activating. Added
log.debug() so failures are visible with --verbose.

Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 31, 2026 12:11pm

Request Review

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