Disconnections

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.

Match finished

PandaScore opens a WebSocket for each match that is covered with live data. When the match finishes, the WebSocket will close with the 1000 code.

Client errors

When the WebSocket closes because of a client error, an error code within the 4xxx range will be sent.

Status CodeDefinition
4001 — UnauthorizedMissing token. See Authentication.
4003 — ForbiddenSocket URL is not available with your plan. See Coverage.
4029 — Too Many ConnectionsMaximum number of simultaneous connections to a match reached (3).

Server errors

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.