Skip to main content

WebSocket Close Codes

WireSocket uses the 4000–4999 private use range to provide specific, actionable feedback to your client on every failed connection.
CodeNameDescriptionWhat To Do
4001Missing TokenNo JWT was provided in the handshakeAdd the token via subprotocol, query parameter, or Auth header. See Authentication.
4002Invalid TokenToken is expired, malformed, or has an invalid signatureRefresh the token using your refresh token and reconnect. See Token Renewal.
4003ForbiddenToken does not match the tenant or application being accessedVerify your client_id and appId are correct for this environment.
4004Connection LimitApplication has hit its total concurrent connection capImplement graceful degradation in your UI. Consider upgrading your plan.
4005Document LimitApplication has hit its total active document capClose unused document sessions. Consider upgrading your plan.
4006Rate LimitOperations per minute threshold exceededBack off and reconnect after 30 seconds. Consider upgrading your plan.
4007Invalid NameDocument name violates naming rulesUse alphanumeric characters, hyphens, and underscores only. Max 255 characters.
4008Users Per DocToo many concurrent users on this documentNotify the user the document is full. Consider upgrading your plan.
4009Wrong RegionDocument is active in another regionParse the REDIRECT: URL from the close reason and reconnect. See Dataplane.

Dashboard API Errors

Errors returned by api.wiresocket.com for token and management API requests.
CodeDescriptionWhat To Do
400 Bad RequestMissing or malformed request parametersCheck required fields — grant_type, client_id, documentName, etc. Do not retry automatically.
401 UnauthorizedAPI key or token is missing or invalidVerify your client_id and client_secret. Re-authenticate if needed.
403 ForbiddenYour account lacks permission for this operationCheck your plan supports this feature. Contact support if unexpected.
429 Too Many RequestsDashboard management API rate limit hitBack off and retry with exponential backoff. Do not hammer the endpoint.
503 Service UnavailableDashboard is under maintenanceUse the dataplane directly with a cached JWT. Monitor status.wiresocket.com for updates.

Dataplane HTTP Errors

Errors returned by ws.wiresocket.com for HTTP requests including the Discovery API.
CodeDescriptionWhat To Do
400 Bad RequestMissing documentName parameterEnsure documentName is included in the query string.
401 UnauthorizedJWT is missing or invalidRe-authenticate and retry with a fresh token.
503 Service UnavailableNode is degraded or overloadedRetry with backoff using the Retry-After header value.
Last modified on March 5, 2026