Saxonberg Server API
    Preparing search index...

    Class PromptCancelledError

    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.

    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; }

    Hierarchy

    • Error
      • PromptCancelledError
    Index

    Constructors

    Properties

    Constructors

    Properties

    reason: "cancelled" | "host-disconnected"