Repository navigation
client: classify connection failures and retry transient ones - #136
Merged
Merged
Conversation
Revoked or invalid tokens now ask for a relogin, deactivated accounts, disabled workspaces and removed users report BAD_CREDENTIALS with a restart action, and network, 5xx and rate limit errors keep retrying with jittered backoff instead of ending in UNKNOWN_ERROR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fizzadar
marked this pull request as ready for review
October 28, 2026 17:08
Contributor
|
All clear! No issues remaining. 🎉 2 issues already resolved
All required CI checks passed on
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
connectAfterBoot cleared stopConnection before connect() did its network and database work, so a Disconnect in that window cancelled nothing, set RTM to nil and connect() then started goroutines on it. connect() now swaps its cancel in only if the boot guard is still current, and starts nothing otherwise.
connect() now runs from the retry goroutine, so a Disconnect during the DM prefetch would crash the bridge instead of being caught by a caller.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boot and RTM connection failures now share one classifier: revoked or invalid tokens send BAD_CREDENTIALS and log the user out, while deactivated accounts, disabled workspaces and removed users send BAD_CREDENTIALS with a restart action. Network, 5xx and rate-limit failures at boot send TRANSIENT_DISCONNECT and retry inside the connector with capped, jittered backoff, which Disconnect cancels at any point, so they no longer end in UNKNOWN_ERROR. When the RTM websocket fails to connect, the bridge now checks the token with auth.test, so a token revoked during a reconnect is reported instead of retrying forever.
🤖 Generated with Claude Code