Skip to main content

Errors

import { WaylocateError } from "@waylocate/embed";

try {
await map.selection.setRoom("does-not-exist");
} catch (error) {
if (error instanceof WaylocateError) {
// error.code — REF_NOT_FOUND, NOT_READY, UNSUPPORTED, TIMEOUT, …
}
}
CodeMeaning
REF_NOT_FOUNDReference does not exist in this campus
NOT_READYCommand arrived before the campus loaded
UNSUPPORTEDThis map build does not have that command
TIMEOUTNo answer in time
PROTOCOL_MISMATCHMap speaks a protocol this SDK does not
DESTROYEDHandle was destroyed or mount aborted
INVALID_OPTIONSBad arguments before anything was sent

See protocol errors for wire-level error codes.