Skip to content

fix(auth): classify invalid_grant refresh errors as permanent#55

Open
VishiATChoudhary wants to merge 1 commit intomainfrom
fix/54-classify-invalid-grant
Open

fix(auth): classify invalid_grant refresh errors as permanent#55
VishiATChoudhary wants to merge 1 commit intomainfrom
fix/54-classify-invalid-grant

Conversation

@VishiATChoudhary
Copy link
Copy Markdown
Collaborator

@VishiATChoudhary VishiATChoudhary commented Apr 13, 2026

Summary

  • explain the user-facing change
  • link the issue or context if relevant

Verification

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • buf generate if protobuf or generated code changed

Release notes

  • conventional commit title matches semver intent

Open with Devin

The oauth2 library returns a *RetrieveError when the token endpoint rejects
a refresh with invalid_grant. Previously RefreshSession wrapped this
generically, so callers could not distinguish permanent refresh-token
revocation from transient errors (network, 5xx, etc).

Introduce ErrInvalidGrant as a sentinel that callers can detect via
errors.Is. This unlocks graceful shutdown on permanent auth loss in
the sidecar (follow-up PRs).

Refs #54
Copy link
Copy Markdown
Collaborator Author

VishiATChoudhary commented Apr 13, 2026

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@VishiATChoudhary VishiATChoudhary requested review from tumberger and removed request for michiosw April 13, 2026 22:47
@VishiATChoudhary VishiATChoudhary marked this pull request as draft April 13, 2026 22:48
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@VishiATChoudhary VishiATChoudhary marked this pull request as ready for review April 14, 2026 03:27
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

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