1003
Unsupported Data
Sent by: BothDo not retry
1003 Unsupported Data is sent when an endpoint receives a data type it cannot handle – typically a binary message when only text is supported, or vice versa. The server may close with 1003 if it expects JSON text frames but receives a binary opcode.
Description
WebSocket has two data frame types: text (opcode 0x1, must be valid UTF-8) and binary (opcode 0x2). If an endpoint only handles one type and receives the other, it sends 1003. This is an application-level type mismatch, not a protocol violation. The fix is to ensure both sides agree on whether the connection carries text or binary data.
Common Causes
- –Client sends binary frame to a text-only server
- –Server sends binary data to a client expecting JSON
- –Application-level data type negotiation failure
Code
1003
RFC
RFC 6455
Sent By
Both
Retry
No