Skip to content

Error Overview

WebSocket errors are divided into two categories:

  • reply.success=false: one request failed
  • session.error: a connection-level or session-level error

Error Reply

json
{
  "type": "reply",
  "requestId": "req_op_001",
  "topic": "device.operation.execute",
  "success": false,
  "error": {
    "code": "COMMAND_REJECTED",
    "message": "Command was rejected."
  }
}

Error Codes

CodeScenarioClient Handling
INVALID_REQUESTInvalid request message formatCorrect the client request format
AUTH_REQUIREDMissing authentication informationCheck the ticket in the connection URL
AUTH_INVALIDInvalid ticket, token, or authentication informationReconnect after obtaining a new access token or wsTicket
AUTH_EXPIREDAccess token has expiredReconnect after obtaining a new access token
AUTH_SCOPE_DENIEDThe current client does not have the required permissionCheck the API client permission settings
DEVICE_NOT_FOUNDDevice does not existCheck deviceId
DEVICE_OFFLINEThe device is currently offlineRetry after the device comes online
COMMAND_REJECTEDThe command format is valid but is rejected by business rulesCheck the relay index and the device type definition
RATE_LIMITEDRequests or heartbeats are too frequentReduce the frequency and retry
INTERNAL_ERRORThe OpenAPI service failed while processing the requestRetry later and record troubleshooting details

Rules

  • Clients must branch on error.code
  • error.message is only for display, logs, and troubleshooting
  • When reporting a WebSocket issue, provide the requestId, topic, API client ID, connection time, and sanitized client logs
Docs buildVersion v1.2.19-20260602-174859-60
Copyright © 2026 WLTE