Learn how to handle PandaScore WebSockets API disconnections.
When disconnecting clients from WebSockets, PandaScore sends a status code that allows your application to understand why the connection was closed.
PandaScore opens a WebSocket for each match that is covered with live data. When the match finishes, the WebSocket will close with the
When the WebSocket closes because of a client error, an error code within the
4xxx range will be sent.
|4001 — Unauthorized||Missing token. See Authentication.|
|4003 — Forbidden||Socket URL is not available with your plan. See Coverage.|
|4029 — Too Many Connections||Maximum number of simultaneous connections to a match reached (3).|
When the WebSocket closes because of a server error, an error code within the
1xxx range will be sent. This code will be different from
1000, which is reserved for normal closure. These only happen because of issues on PandaScore's servers and should be rare.
When you are disconnected because of such error, you should try to connect again. When using the Events API, you might also want to recover the missing events.
If the problem persists, check our status page or contact our support.
Updated 10 months ago