Errors and close codes
Connecting
| Status | error |
|---|---|
400 | this API's sockets must be compressed: offer permessage-deflate (Sec-WebSocket-Extensions: permessage-deflate) |
401 | an API key is required: ... / this API key is not recognised or is no longer active |
429 | this key has all its sockets open: close one first |
429 | this key is connecting too often: wait before the next connect, then keep the socket open (updates are pushed to it), with retry_after and a Retry-After header |
Error messages
The socket stays open.
json
{"type":"error","sub":"game","message":"no such event"}
message |
|---|
not JSON |
op must be subscribe, unsubscribe or ping |
id is required |
id is longer than 64 characters |
unknown field "..." |
give a league or an event, not both |
league: no such value "..." |
types must be a list of strings |
league must be a string |
no such event |
too many subscriptions on this connection |
this key's plan does not include that league |
Close codes
| Code | Reason | What to do |
|---|---|---|
1001 | the server is restarting: reconnect | Connect again straight away. |
1002 | not a valid WebSocket frame | Fix the client. |
1003 | text messages only | Send JSON as text. |
1007 | the compressed message could not be read | Fix the client's compression. |
1008 | this key is no longer active | Use your current key. |
1009 | a message can be at most 64 kB | Send smaller messages. |
1013 | this connection fell too far behind: read faster or subscribe to less | Read faster, or subscribe to less. |
A client that stops reading for 30 seconds is disconnected.