Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

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

Merged
BYK merged 1 commit into
mainfrom
fix/scope-recovery-silent-catch
Sep 4, 2026
Merged

BYK merged 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

@BYK
BYK marked this pull request as ready for review September 4, 2026 09:42
@BYK
BYK merged commit f738c00 into main Sep 4, 2026
33 checks passed
@BYK
BYK deleted the fix/scope-recovery-silent-catch branch September 4, 2026 09:44

This branch was successfully deployed

1 active deployment
Preview — 3a25494c Deployed Aug 31, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants