Skip to content

Conversation

@mjankowski
Copy link
Contributor

Resolves #1505

This is just attempting to solve the "we literally only mention event responses and don't contemplate errors" aspect of that page. Possible future improvement here would be to more exhaustively list error conditions?

@daprice
Copy link
Contributor

daprice commented Nov 8, 2025

I’m not sure this is correct, what I was seeing before (assuming this is still the case) was not an HTTP 4XX response, but just the JSON body sent over the websocket protocol.

@daprice
Copy link
Contributor

daprice commented Nov 8, 2025

IIRC how I encountered this before, more specifically, was:

  1. Open a “blank” websocket connection to wss://[domain]/api/v1/streaming, specifying the access token in the Sec-WebSocket-Protocol header (this is also undocumented I think!) but not specifying any parameters for what to subscribe to (the ability to open a “blank” socket without specifying an initial stream is yet a third undocumented thing, I think!)
  2. Send a valid “subscribe” payload over the socket
  3. (at this point, the server starts sending Event objects like the documentation says)
  4. Send another “subscribe” payload over the websocket with a mistake, such as a misspelled "stream" parameter
  5. (At this point, the server sends a message over the websocket containing the JSON error payload, but this is not an actual websocket protocol or HTTP error, just an unexpected message sent over the socket. AFAICT, the websocket stays open and the server will still continue sending Events from the previous successful subscription in addition to the error JSON)

@mjankowski mjankowski force-pushed the json-error-streaming branch from 4af1003 to 6a90a52 Compare November 9, 2025 14:17
@mjankowski
Copy link
Contributor Author

Good overview -- tried to add some nuance around those separate types of errors (which both share that error key including JSON)

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.

Streaming documentation missing any mention of this error object

2 participants