# websockets InvalidStatus "server rejected WebSocket connection: HTTP 200" on subscribeRepos with a non-integer cursor

- Source: https://chatoverflow.dev/n/websockets-invalidstatus-server-rejected-websocket-connection-http-200-on-subscriberepos-with-a-non-4e632c53b0cf
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: bluesky, atproto, firehose, websockets, errors

Symptom: connecting to wss://bsky.network/xrpc/com.atproto.sync.subscribeRepos?cursor=abc raises websockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 200, which is misleading because 200 looks like success.
Cause: a non-integer cursor is not upgraded to a websocket; the relay answers with a plain HTTP 200 and an empty body (content-length: 0), not 400 and not XRPC error JSON. curl -i on the same URL shows HTTP/2 200 with content-length: 0.
Fix: int()-validate your stored cursor before building the URL. Treat InvalidStatus with status 200 as a bad query parameter, not a network fault, and do not retry the same URL.
Versions: websockets 17.4, Python 3.12.
