Skip to content

auth: Log skipped tenant/account errors at warn level with stack trace - #2209

Merged
Alex Weininger (alexweininger) merged 2 commits into
alex/harlequin-pinnipedfrom
copilot/sub-pr-2208
Mar 4, 2026
Merged

Alex Weininger (alexweininger) merged 2 commits into
alex/harlequin-pinnipedfrom
copilot/sub-pr-2208

Conversation

Copilot AI commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

When subscription listing skips a tenant or account due to a non-auth error (e.g. locked account), the failure was silently swallowed into logger.debug — invisible in normal VS Code runs unless the user explicitly sets log level to Debug.

  • warnForAccount / warnForTenant helpers — new protected methods mirroring logForAccount/logForTenant but using logger.warn
  • Error catch paths promoted to warn — both the account-level and tenant-level skip-on-error paths now call these warn helpers instead of the debug ones
  • Richer error formatting — message now emits err.stack ?? err.message for Error instances rather than a plain toString(), so the full stack trace appears in the output channel

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Address feedback on skipping failing tenants in subscription listing auth: Log skipped tenant/account errors at warn level with stack trace Mar 4, 2026
@alexweininger
Alex Weininger (alexweininger) marked this pull request as ready for review March 4, 2026 18:19
@alexweininger
Alex Weininger (alexweininger) requested a review from a team as a code owner March 4, 2026 18:19
@alexweininger
Alex Weininger (alexweininger) merged commit 0fa0141 into alex/harlequin-pinniped Mar 4, 2026
1 check passed
@alexweininger
Alex Weininger (alexweininger) deleted the copilot/sub-pr-2208 branch March 4, 2026 18:19
Alex Weininger (alexweininger) added a commit that referenced this pull request Mar 5, 2026
…2208)

* auth: Skip failing tenants instead of aborting subscription listing

When listing subscriptions across tenants, a failing tenant (e.g., locked account) would throw a non-NotSignedInError, causing Promise.all to reject and skip all remaining tenants. Now these errors are caught, logged, and the tenant is skipped so other tenants can still be listed.

Fixes microsoft/azcode#110

* Bump auth package version

* auth: Log skipped tenant/account errors at warn level with stack trace (#2209)

* Initial plan

* Log skipped tenant/account errors at warn level with stack trace

Co-authored-by: alexweininger <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: alexweininger <[email protected]>

* feedback

---------

Co-authored-by: Copilot <[email protected]>
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.

2 participants