Error class
All Crosslink protocol errors are instances ofCrosslinkError.
code is one of the values below. These travel on the wire as lowercase, underscore-separated strings and are stable — new codes may be added, existing ones are never repurposed.
Error codes
CrosslinkError.isInternal(code) is true for internal, parse_error, and invalid_message — codes that must never leak raw detail across the wire.
Fingerprint mismatches during pairing (client.pairFromQr) and a few pairing-flow guard checks throw a plain Error rather than a CrosslinkError, so they have no code property — check the message text instead.
Error handling
Host
Client
RPC
Debug logging
Enable debug logging to trace errors. A logger must implement the fullLogger interface (trace, debug, info, warn, error, child, isEnabled) — use consoleLogger() from @crosslink/core rather than a partial object literal: