Error Handling
Error codes, troubleshooting guide for RMS-Socket connections.
Connection Error Codes
400
Bad Request
Invalid customerid format
Use numeric characters only
401
Unauthorized
Missing customerid header
Add customerid to extraHeaders
402
Payment Required
Account inactive or expired
Contact LSports support
403
Forbidden
Customer ID not found
Verify your Customer ID
429
Too Many Requests
Rate limit exceeded
Wait before reconnecting
500
Internal Error
Server error
Retry with backoff
Error Response Handling
socket.on("connect_error", (error) => {
console.error("Connection error:", error.message);
// Access status code if available
const statusCode = error.data?.statusCode;
switch (statusCode) {
case 400:
console.error("Invalid customerid format");
break;
case 401:
console.error("Missing customerid header");
break;
case 402:
console.error("Account inactive or expired - contact support");
break;
case 403:
console.error("Customer not authorized");
break;
case 429:
console.error("Rate limited - wait before retry");
break;
default:
console.error("Connection failed - will retry:", error.message);
}
});WebSocket Close Codes
After the WebSocket connection is established, the server may close the connection with application-defined close codes:
1000
Normal closure
1001
Server going away (maintenance)
4401
Authentication failed after upgrade
4403
Authorization revoked
Troubleshooting
Common Issues
Missing customerid header
Header not included in connection
Add customerid to extraHeaders
Connection timeout
Network or firewall issues
Check network connectivity, whitelist WSS port
Invalid customerid format
Non-numeric customer ID
Use numeric customer ID only
Account inactive
Subscription expired
Contact LSports support
No messages received
Not joined to room
Emit join event after connecting
Support
For persistent issues or questions, contact LSports support with:
Your Customer ID
Error messages received
Timestamp of the issue
Last updated
Was this helpful?