Skip to content

Classify refresh token errors as expected authentication failures - #366

Draft
mendral-app[bot] wants to merge 1 commit into
mainfrom
mendral/classify-refresh-token-errors
Draft

Classify refresh token errors as expected authentication failures#366
mendral-app[bot] wants to merge 1 commit into
mainfrom
mendral/classify-refresh-token-errors

Conversation

@mendral-app

@mendral-app mendral-app Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add string-based detection for OAuth2 refresh token errors in classifyCLIError() so they are classified as CLIErrorAuthentication (expected) instead of falling through to CLIErrorInternal and being reported to Sentry
  • Update IsAuthError() to recognize refresh token failures, enabling the auth source hint to be displayed for these errors

Fixes: https://app.mendral.com/insights/01KZA9YF2CD65M6NYV5KQM393D


Note

Created by Mendral. Tag @mendral-app with feedback or questions.

OAuth2 refresh token failures from the SDK are untyped errors that fall
through the CLI's error classifier and get incorrectly reported to Sentry
as internal bugs. Add string-based detection for refresh token errors in
classifyCLIError() and IsAuthError() so they are treated as expected
authentication failures.
@mendral-app
mendral-app Bot requested a review from a team August 6, 2026 01:13
@mendral-app
mendral-app Bot requested a deployment to integration-tests August 6, 2026 01:13 Waiting
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.

0 participants