Skip to content

fix(edge): signal WebSocket auth failures with custom close codes#149

Open
chrischrischris wants to merge 2 commits into
mainfrom
imstoken
Open

fix(edge): signal WebSocket auth failures with custom close codes#149
chrischrischris wants to merge 2 commits into
mainfrom
imstoken

Conversation

@chrischrischris
Copy link
Copy Markdown
Contributor

When the da-admin HEAD rejects a WebSocket upgrade, return 101 + an immediately-closed WebSocket with code 4401 (auth) or 4403 (forbidden) instead of an HTTP error that the browser surfaces only as opaque 1006. This lets the client distinguish token-expired from network failures and refresh its IMS token before reconnecting.

chrischrischris and others added 2 commits May 14, 2026 17:04
When the da-admin HEAD rejects a WebSocket upgrade, return 101 + an
immediately-closed WebSocket with code 4401 (auth) or 4403 (forbidden)
instead of an HTTP error that the browser surfaces only as opaque 1006.
This lets the client distinguish token-expired from network failures and
refresh its IMS token before reconnecting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants