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, …
}
}
| Code | Meaning |
|---|---|
REF_NOT_FOUND | Reference does not exist in this campus |
NOT_READY | Command arrived before the campus loaded |
UNSUPPORTED | This map build does not have that command |
TIMEOUT | No answer in time |
PROTOCOL_MISMATCH | Map speaks a protocol this SDK does not |
DESTROYED | Handle was destroyed or mount aborted |
INVALID_OPTIONS | Bad arguments before anything was sent |
See protocol errors for wire-level error codes.