Awaiting prompt promises reject with this when the prompt is
cancelled — by the player (prompt-cancel wire message or the
prompt cancel verb), by server-side PromptApi.cancel /
cancelAll, or by disconnect cleanup.
Codebase precedent: MqlPermissionError, SecurityError,
ContainmentError. Typed Error subclasses give clean
instanceof branching at controller catch sites.
Awaiting prompt promises reject with this when the prompt is cancelled — by the player (
prompt-cancelwire message or theprompt cancelverb), by server-sidePromptApi.cancel/cancelAll, or by disconnect cleanup.Codebase precedent:
MqlPermissionError,SecurityError,ContainmentError. TypedErrorsubclasses give cleaninstanceofbranching at controller catch sites.try { const sword = await PromptApi.mqlObject(iact, label, matches); } catch (err) { if (err instanceof PromptCancelledError) { // err.reason discriminates 'cancelled' vs 'host-disconnected' return abortCommand(); } throw err; }