Skip to content

fix: remove incorrect RefreshToken throw from Bluesky provider#1202

Open
smith-and-web wants to merge 1 commit intogitroomhq:mainfrom
smith-and-web:fix/bluesky-custom-fields-state
Open

fix: remove incorrect RefreshToken throw from Bluesky provider#1202
smith-and-web wants to merge 1 commit intogitroomhq:mainfrom
smith-and-web:fix/bluesky-custom-fields-state

Conversation

@smith-and-web
Copy link

@smith-and-web smith-and-web commented Feb 2, 2026

Summary

  • Removes the RefreshToken exception throw from getAgent() in the Bluesky provider
  • Bluesky uses password-based auth (stored in customInstanceDetails), not OAuth tokens
  • The refreshToken() method returns empty values, so throwing RefreshToken caused integrations to disconnect

Problem

When the Bluesky getAgent() method encountered a login error, it threw RefreshToken. This triggered the token refresh flow in RefreshIntegrationService, which:

  1. Called refreshToken() on the Bluesky provider
  2. Got empty/invalid values back (since Bluesky doesn't implement token refresh)
  3. Called disconnectChannel() since refresh "failed"

This caused Bluesky integrations to be marked as disconnected even for transient errors.

Solution

Let login errors propagate naturally instead of wrapping them in RefreshToken. This allows upstream code to handle the error appropriately without triggering the token refresh flow that doesn't apply to password-based providers.

Test plan

  • Connect a Bluesky account and verify posting works
  • Temporarily use invalid credentials and verify the error is handled gracefully (not triggering token refresh)
  • Verify the integration doesn't get disconnected on transient network errors

Bluesky uses password-based authentication stored in customInstanceDetails,
not OAuth tokens. The getAgent() method re-authenticates on every operation.

Previously, if login failed, it threw RefreshToken which triggered the token
refresh flow. Since Bluesky doesn't support token refresh (refreshToken()
returns empty values), this caused the integration to be disconnected.

Now login errors propagate naturally without triggering the refresh flow,
allowing proper error handling upstream.
@vercel
Copy link

vercel bot commented Feb 2, 2026

@smith-and-web is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

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