Errors
Failures arrive as results with ok: false and an error object.
{
"waylocate": 1,
"kind": "result",
"name": "selection.setRoom",
"id": "c7",
"ok": false,
"error": { "code": "REF_NOT_FOUND", "message": "No room matching 'room-999'" }
}
| Code | Meaning |
|---|---|
REF_NOT_FOUND | The reference did not resolve in this campus |
NOT_READY | Campus data had not loaded, or the reference cannot be acted on yet |
UNSUPPORTED | The command is not in this build's capability list |
INVALID_PAYLOAD | Shape or range validation failed |
INTERNAL | An unexpected failure |
ORIGIN_REJECTED | Sender origin not permitted. Never transmitted. |
Codes are contract. They are deprecated rather than renamed.
The message is intended for logs and bug reports. Its wording is not part of
the contract, so do not branch on it.
ORIGIN_REJECTED is never sent
The code exists in the error type, and appears in the map's own logs, but never reaches a host.
Answering a message from a disallowed origin would mean posting to an origin that has already been judged untrusted, which both confirms the map is present and hands the sender a reply channel. Such messages are dropped in silence instead.
The practical consequence for a host is that a rejected origin produces no error at all: commands are sent and never answered, and the host's own timeout is what eventually fires. See diagnosing a silent map.
Messages arriving without the waylocate field are likewise ignored without
noise, since a page's window receives constant unrelated traffic from
development tooling and browser extensions.
Timeouts are host-side
There is no timeout code on the wire. A command that is never answered is never
answered; the TIMEOUT a host reports is its own clock expiring. The SDK's
default is applied per command and can be changed with commandTimeoutMs.
Next
- SDK errors for the codes a host using the package
will see, which include
TIMEOUT,PROTOCOL_MISMATCH, andDESTROYED.