Skip to content

fix: make invalid session errors clearer - #22

Merged
g-linville merged 1 commit into
obot-platform:mainfrom
g-linville:better-invalid-session-error
Oct 9, 2026
Merged

g-linville merged 1 commit into
obot-platform:mainfrom
g-linville:better-invalid-session-error

Conversation

@g-linville

@g-linville g-linville commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

this solves part of obot-platform/obot#8164

Once this is merged, I will have a PR for enterprise-providers to bump their dependencies on this, and then the actual fix in Obot that relies on this.

Signed-off-by: Grant Linville <grant@obot.ai>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Obot currently attempts to JSON-decode the new plain-text 401 response, reproducing the reported parsing error instead of clearing the session.

1 open finding
What changed in this PR

Introduces explicit invalid-session handling for authentication refresh failures related to obot#8164.

Changes:

  • Classifies rejected refreshes as invalid sessions.
  • Returns HTTP 401 for invalid sessions.
  • Adds status-mapping tests.
File Description
github-auth-provider/​main.go Uses shared state-error handling.
auth-providers-common/​pkg/​state/​state.go Adds invalid-session classification and HTTP mapping.
auth-providers-common/​pkg/​state/​state_test.go Tests error-to-status mapping.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread auth-providers-common/pkg/state/state.go
@g-linville
g-linville merged commit 06ec700 into obot-platform:main Oct 9, 2026
2 checks passed
@g-linville
g-linville deleted the better-invalid-session-error branch October 9, 2026 13:31
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.

5 participants