Skip to content

waygraph / WAYGRAPH_ERRORS

Variable: WAYGRAPH_ERRORS ​

const WAYGRAPH_ERRORS: object

Defined in: src/engine/errors.ts:11

Every error the engine throws, in one file, each with a stable code. When something breaks, grep WG_ the-error-you-saw (or open this file and Ctrl-F the code) tells you exactly what threw, why, and where to look - without re-explaining the engine to an AI every time.

Convention: WG_<AREA>_<WHAT>. A code, once shipped, never changes meaning or gets reused for something else - add a new one instead. Every thrown WaygraphError message starts with [CODE], so the code survives being copy-pasted out of a terminal/CI log on its own.

Type Declaration ​

WG_BRANCH_REGRESSION_NO_BROWSER ​

readonly WG_BRANCH_REGRESSION_NO_BROWSER: object

WG_BRANCH_REGRESSION_NO_BROWSER.fix ​

readonly fix: "Pass { cloneSession: false } to run the single live path in this context instead." = "Pass { cloneSession: false } to run the single live path in this context instead."

WG_BRANCH_REGRESSION_NO_BROWSER.means ​

readonly means: "cloneSession is on (the default) but context.browser() returned null - a persistent context has no Browser to clone a new context from." = "cloneSession is on (the default) but context.browser() returned null - a persistent context has no Browser to clone a new context from."

WG_BRANCH_REGRESSION_NO_BROWSER.where ​

readonly where: "engine/flow/branch-regression.ts - runBranchRegression()" = "engine/flow/branch-regression.ts - runBranchRegression()"

WG_COMPOSE_EMPTY ​

readonly WG_COMPOSE_EMPTY: object

WG_COMPOSE_EMPTY.fix ​

readonly fix: "Pass at least one Block." = "Pass at least one Block."

WG_COMPOSE_EMPTY.means ​

readonly means: "composeBlock() was called with zero steps." = "composeBlock() was called with zero steps."

WG_COMPOSE_EMPTY.where ​

readonly where: "engine/block/compose.ts - composeBlock()" = "engine/block/compose.ts - composeBlock()"

WG_EXPECT_CHANGED_PAGE ​

readonly WG_EXPECT_CHANGED_PAGE: object

WG_EXPECT_CHANGED_PAGE.fix ​

readonly fix: "Make the action a step of its own (a Method Block) before the step whose expectation reads what it left." = "Make the action a step of its own (a Method Block) before the step whose expectation reads what it left."

WG_EXPECT_CHANGED_PAGE.means ​

readonly means: "An expectation clicked, typed, navigated or otherwise acted on the page. Expectations only read and judge." = "An expectation clicked, typed, navigated or otherwise acted on the page. Expectations only read and judge."

WG_EXPECT_CHANGED_PAGE.where ​

readonly where: "engine/run/read-only.ts - a step's expectations" = "engine/run/read-only.ts - a step's expectations"

WG_EXPECT_SET_MEM ​

readonly WG_EXPECT_SET_MEM: object

WG_EXPECT_SET_MEM.fix ​

readonly fix: "Set the key in a Block's act (or with .set() in the flow), and let the expectation read it." = "Set the key in a Block's act (or with .set() in the flow), and let the expectation read it."

WG_EXPECT_SET_MEM.means ​

readonly means: "An expectation set a mem key. Expectations only read; a step that records something sets it in its act." = "An expectation set a mem key. Expectations only read; a step that records something sets it in its act."

WG_EXPECT_SET_MEM.where ​

readonly where: "engine/run/expect.ts - a step's expectations" = "engine/run/expect.ts - a step's expectations"

WG_FASTFORWARD_EMPTY ​

readonly WG_FASTFORWARD_EMPTY: object

WG_FASTFORWARD_EMPTY.fix ​

readonly fix: "Add at least one Block between ffStart()/ffEnd() (or the equivalent Map builder call)." = "Add at least one Block between ffStart()/ffEnd() (or the equivalent Map builder call)."

WG_FASTFORWARD_EMPTY.means ​

readonly means: "A fast-forward window was closed with zero steps inside it." = "A fast-forward window was closed with zero steps inside it."

WG_FASTFORWARD_EMPTY.where ​

readonly where: "engine/block/compose.ts - fastForwardComposeBlock()" = "engine/block/compose.ts - fastForwardComposeBlock()"

WG_FLOW_BLOCK_NOT_FOUND ​

readonly WG_FLOW_BLOCK_NOT_FOUND: object

WG_FLOW_BLOCK_NOT_FOUND.fix ​

readonly fix: "Check the name/index against flow.blocks() - it lists every Block this Flow actually has, tag-prefixed for branches." = "Check the name/index against flow.blocks() - it lists every Block this Flow actually has, tag-prefixed for branches."

WG_FLOW_BLOCK_NOT_FOUND.means ​

readonly means: "The Block name/index/reference given doesn't exist in this Flow (or chained Flows)." = "The Block name/index/reference given doesn't exist in this Flow (or chained Flows)."

WG_FLOW_BLOCK_NOT_FOUND.where ​

readonly where: "engine/block/block.ts - findBlock() (used by withBlockVerify/modBlockVerify)" = "engine/block/block.ts - findBlock() (used by withBlockVerify/modBlockVerify)"

WG_GIVEN_FAILED ​

readonly WG_GIVEN_FAILED: object

WG_GIVEN_FAILED.fix ​

readonly fix: "Fix the seeding Block (its call, its verify) or the data it needs; the scenario itself was never judged." = "Fix the seeding Block (its call, its verify) or the data it needs; the scenario itself was never judged."

WG_GIVEN_FAILED.means ​

readonly means: "A precondition of the flow (`map({ given })`) couldn't be set up, so the flow was not played: the run is blocked, not failed." = "A precondition of the flow (`map({ given })`) couldn't be set up, so the flow was not played: the run is blocked, not failed."

WG_GIVEN_FAILED.where ​

readonly where: "engine/flow/flow.ts - Flow.run, runner/play-steps.ts - a flow's `given` Block" = "engine/flow/flow.ts - Flow.run, runner/play-steps.ts - a flow's `given` Block"

WG_MAP_BRANCH_NO_PRIOR_STEP ​

readonly WG_MAP_BRANCH_NO_PRIOR_STEP: object

WG_MAP_BRANCH_NO_PRIOR_STEP.fix ​

readonly fix: "Add a .gotoPage()/.gotoExternal()/.method() before .branch()." = "Add a .gotoPage()/.gotoExternal()/.method() before .branch()."

WG_MAP_BRANCH_NO_PRIOR_STEP.means ​

readonly means: ".branch() was called before any step existed to branch FROM." = ".branch() was called before any step existed to branch FROM."

WG_MAP_BRANCH_NO_PRIOR_STEP.where ​

readonly where: "engine/flow/map-builder.ts - MapBuilder.branch()" = "engine/flow/map-builder.ts - MapBuilder.branch()"

WG_MAP_BRANCH_SHARED_SESSION_UNSUPPORTED ​

readonly WG_MAP_BRANCH_SHARED_SESSION_UNSUPPORTED: object

WG_MAP_BRANCH_SHARED_SESSION_UNSUPPORTED.fix ​

readonly fix: "Call run(context, mem[, options]) instead, keeping the same page across the branch." = "Call run(context, mem[, options]) instead, keeping the same page across the branch."

WG_MAP_BRANCH_SHARED_SESSION_UNSUPPORTED.means ​

readonly means: "run(mem, config) was called on a branched Flow - that convenience form always closes its own browser/page before the branch's tag is known, so the branch can never be reached." = "run(mem, config) was called on a branched Flow - that convenience form always closes its own browser/page before the branch's tag is known, so the branch can never be reached."

WG_MAP_BRANCH_SHARED_SESSION_UNSUPPORTED.where ​

readonly where: "engine/flow/map-builder.ts - a .branch()-built Flow's run()" = "engine/flow/map-builder.ts - a .branch()-built Flow's run()"

WG_MAP_EMPTY ​

readonly WG_MAP_EMPTY: object

WG_MAP_EMPTY.fix ​

readonly fix: "Add at least one .gotoPage()/.gotoExternal()/.method()." = "Add at least one .gotoPage()/.gotoExternal()/.method()."

WG_MAP_EMPTY.means ​

readonly means: "A map() with no steps was used as a flow." = "A map() with no steps was used as a flow."

WG_MAP_EMPTY.where ​

readonly where: "engine/flow/map-builder.ts - the flow, when first used" = "engine/flow/map-builder.ts - the flow, when first used"

WG_MAP_FF_ALREADY_OPEN ​

readonly WG_MAP_FF_ALREADY_OPEN: object

WG_MAP_FF_ALREADY_OPEN.fix ​

readonly fix: "Call .ffEnd() before opening another fast-forward window." = "Call .ffEnd() before opening another fast-forward window."

WG_MAP_FF_ALREADY_OPEN.means ​

readonly means: ".ffStart() was called while a previous .ffStart() window is still open." = ".ffStart() was called while a previous .ffStart() window is still open."

WG_MAP_FF_ALREADY_OPEN.where ​

readonly where: "engine/flow/map-builder.ts - MapBuilder.ffStart()" = "engine/flow/map-builder.ts - MapBuilder.ffStart()"

WG_MAP_FF_EMPTY ​

readonly WG_MAP_FF_EMPTY: object

WG_MAP_FF_EMPTY.fix ​

readonly fix: "Add at least one .gotoPage()/.method() inside the .ffStart()/.ffEnd() window." = "Add at least one .gotoPage()/.method() inside the .ffStart()/.ffEnd() window."

WG_MAP_FF_EMPTY.means ​

readonly means: ".ffEnd() closed a window with zero steps inside it." = ".ffEnd() closed a window with zero steps inside it."

WG_MAP_FF_EMPTY.where ​

readonly where: "engine/flow/map-builder.ts - MapBuilder.ffEnd()" = "engine/flow/map-builder.ts - MapBuilder.ffEnd()"

WG_MAP_FF_NOT_CLOSED ​

readonly WG_MAP_FF_NOT_CLOSED: object

WG_MAP_FF_NOT_CLOSED.fix ​

readonly fix: "Close it with .ffEnd() after its last step." = "Close it with .ffEnd() after its last step."

WG_MAP_FF_NOT_CLOSED.means ​

readonly means: "The flow was used (run, listed, nested, branched) while a .ffStart() window was still open." = "The flow was used (run, listed, nested, branched) while a .ffStart() window was still open."

WG_MAP_FF_NOT_CLOSED.where ​

readonly where: "engine/flow/map-builder.ts - the flow, when first used" = "engine/flow/map-builder.ts - the flow, when first used"

WG_MAP_FF_NOT_OPEN ​

readonly WG_MAP_FF_NOT_OPEN: object

WG_MAP_FF_NOT_OPEN.fix ​

readonly fix: "Remove the stray .ffEnd(), or add the .ffStart() it's meant to close." = "Remove the stray .ffEnd(), or add the .ffStart() it's meant to close."

WG_MAP_FF_NOT_OPEN.means ​

readonly means: ".ffEnd() was called with no matching .ffStart()." = ".ffEnd() was called with no matching .ffStart()."

WG_MAP_FF_NOT_OPEN.where ​

readonly where: "engine/flow/map-builder.ts - MapBuilder.ffEnd()" = "engine/flow/map-builder.ts - MapBuilder.ffEnd()"

WG_MAP_LANDS ​

readonly WG_MAP_LANDS: object

WG_MAP_LANDS.fix ​

readonly fix: "If the other outcome is a real case, write a flow (or a .branch()) for it; otherwise fix the step before it (wrong data) or the Block's resolve." = "If the other outcome is a real case, write a flow (or a .branch()) for it; otherwise fix the step before it (wrong data) or the Block's resolve."

WG_MAP_LANDS.means ​

readonly means: "A step said which of its Block's outcomes the flow continues from (`lands`), and the Block resolved to another one - or `lands` names a Checkpoint the Block never resolves to." = "A step said which of its Block's outcomes the flow continues from (`lands`), and the Block resolved to another one - or `lands` names a Checkpoint the Block never resolves to."

WG_MAP_LANDS.where ​

readonly where: "engine/flow/map-builder.ts - .method/.gotoPage/.gotoExternal(Block, { lands })" = "engine/flow/map-builder.ts - .method/.gotoPage/.gotoExternal(Block, { lands })"

WG_MAP_NO_INPUT ​

readonly WG_MAP_NO_INPUT: object

WG_MAP_NO_INPUT.fix ​

readonly fix: "Declare the sub-flow's input with `map({ input: SomeKey })`, or drop `input` from the `.flow()` call." = "Declare the sub-flow's input with `map({ input: SomeKey })`, or drop `input` from the `.flow()` call."

WG_MAP_NO_INPUT.means ​

readonly means: "`.flow()` was given an input for a sub-flow that takes none (it has no `map({ input })`)." = "`.flow()` was given an input for a sub-flow that takes none (it has no `map({ input })`)."

WG_MAP_NO_INPUT.where ​

readonly where: "engine/flow/map-builder.ts - .flow(sub, { input })" = "engine/flow/map-builder.ts - .flow(sub, { input })"

WG_MAP_STEPS_END ​

readonly WG_MAP_STEPS_END: object

WG_MAP_STEPS_END.fix ​

readonly fix: "Play it in a flow with .steps(part); a .branch() goes in the flow, after it." = "Play it in a flow with .steps(part); a .branch() goes in the flow, after it."

WG_MAP_STEPS_END.means ​

readonly means: "A part made with steps() was run, nested or branched as a flow: a part is steps a flow plays, not a flow." = "A part made with steps() was run, nested or branched as a flow: a part is steps a flow plays, not a flow."

WG_MAP_STEPS_END.where ​

readonly where: "engine/flow/map-builder.ts - steps()" = "engine/flow/map-builder.ts - steps()"

WG_MAP_WRONG_KIND ​

readonly WG_MAP_WRONG_KIND: object

WG_MAP_WRONG_KIND.fix ​

readonly fix: "Use the factory the error names, or move this Block to the matching .gotoPage()/.method() call (an Expect Block goes in expect: [...])." = "Use the factory the error names, or move this Block to the matching .gotoPage()/.method() call (an Expect Block goes in expect: [...])."

WG_MAP_WRONG_KIND.means ​

readonly means: "A Block passed to a MapBuilder step method doesn't carry the __waygraphKind a real defineNavBlock/definePageBlock/defineMethodBlock stamps - either the wrong factory was used, or the object was hand-rolled instead of going through one." = "A Block passed to a MapBuilder step method doesn't carry the __waygraphKind a real defineNavBlock/definePageBlock/defineMethodBlock stamps - either the wrong factory was used, or the object was hand-rolled instead of going through one."

WG_MAP_WRONG_KIND.where ​

readonly where: "engine/flow/map-builder.ts - MapBuilder.gotoPage/gotoExternal/method()" = "engine/flow/map-builder.ts - MapBuilder.gotoPage/gotoExternal/method()"

WG_MAP_WRONG_ORIGIN ​

readonly WG_MAP_WRONG_ORIGIN: object

WG_MAP_WRONG_ORIGIN.fix ​

readonly fix: "Use .gotoExternal() for a genuinely different origin, .gotoPage() for the app's own homeOrigin, or fix the Block's url." = "Use .gotoExternal() for a genuinely different origin, .gotoPage() for the app's own homeOrigin, or fix the Block's url."

WG_MAP_WRONG_ORIGIN.means ​

readonly means: "A Block's static `url` origin doesn't match what .gotoPage() (same-origin) or .gotoExternal() (cross-origin) expects, given this map()'s homeOrigin." = "A Block's static `url` origin doesn't match what .gotoPage() (same-origin) or .gotoExternal() (cross-origin) expects, given this map()'s homeOrigin."

WG_MAP_WRONG_ORIGIN.where ​

readonly where: "engine/flow/map-builder.ts - MapBuilder.gotoPage/gotoExternal()" = "engine/flow/map-builder.ts - MapBuilder.gotoPage/gotoExternal()"

WG_MAP_WRONG_SALT ​

readonly WG_MAP_WRONG_SALT: object

WG_MAP_WRONG_SALT.fix ​

readonly fix: "Build it with defineMethodBlock; an Expect Block goes in a step's expect: [...], not in a step." = "Build it with defineMethodBlock; an Expect Block goes in a step's expect: [...], not in a step."

WG_MAP_WRONG_SALT.means ​

readonly means: "A Block passed to .method() isn't a real Method Block (missing __waygraphSalt)." = "A Block passed to .method() isn't a real Method Block (missing __waygraphSalt)."

WG_MAP_WRONG_SALT.where ​

readonly where: "engine/flow/map-builder.ts - MapBuilder.method()" = "engine/flow/map-builder.ts - MapBuilder.method()"

WG_MEM_READ_BEFORE_SET ​

readonly WG_MEM_READ_BEFORE_SET: object

WG_MEM_READ_BEFORE_SET.fix ​

readonly fix: "Set it first, or use mem.has(key) to check before an optional read." = "Set it first, or use mem.has(key) to check before an optional read."

WG_MEM_READ_BEFORE_SET.means ​

readonly means: "mem.get(key) was called for a key that was never mem.set() on this MemPage." = "mem.get(key) was called for a key that was never mem.set() on this MemPage."

WG_MEM_READ_BEFORE_SET.where ​

readonly where: "engine/mem/mem.ts - MemPage.get()" = "engine/mem/mem.ts - MemPage.get()"

WG_MODVERIFY_FUNCTION_FORM ​

readonly WG_MODVERIFY_FUNCTION_FORM: object

WG_MODVERIFY_FUNCTION_FORM.fix ​

readonly fix: "Use withVerify() to replace the whole verify instead." = "Use withVerify() to replace the whole verify instead."

WG_MODVERIFY_FUNCTION_FORM.means ​

readonly means: "modVerify() was called on a Block whose verify is a function (tag-driven), which has no fixed list to address an item into." = "modVerify() was called on a Block whose verify is a function (tag-driven), which has no fixed list to address an item into."

WG_MODVERIFY_FUNCTION_FORM.where ​

readonly where: "engine/block/block.ts - modVerify()" = "engine/block/block.ts - modVerify()"

WG_MODVERIFY_NOT_FOUND ​

readonly WG_MODVERIFY_NOT_FOUND: object

WG_MODVERIFY_NOT_FOUND.fix ​

readonly fix: "Check the Block's actual verify list for the right name/index." = "Check the Block's actual verify list for the right name/index."

WG_MODVERIFY_NOT_FOUND.means ​

readonly means: "The Trait name/index given doesn't exist in this Block's verify list." = "The Trait name/index given doesn't exist in this Block's verify list."

WG_MODVERIFY_NOT_FOUND.where ​

readonly where: "engine/block/block.ts - modVerify()" = "engine/block/block.ts - modVerify()"

WG_PANES ​

readonly WG_PANES: object

WG_PANES.fix ​

readonly fix: "Name panes the flow declares; give `as` only to a pane with its own context; share a context with `with` where the browser has only one (a persistent context, as with extensions)." = "Name panes the flow declares; give `as` only to a pane with its own context; share a context with `with` where the browser has only one (a persistent context, as with extensions)."

WG_PANES.means ​

readonly means: "A flow's panes don't fit: a pane `with` one that isn't there (or that shares another's), an `as` on a pane that shares a context, a step in a pane the flow doesn't declare, or a pane that needs a context of its own in a browser that can't make one." = "A flow's panes don't fit: a pane `with` one that isn't there (or that shares another's), an `as` on a pane that shares a context, a step in a pane the flow doesn't declare, or a pane that needs a context of its own in a browser that can't make one."

WG_PANES.where ​

readonly where: "engine/flow/panes.ts - map({ panes }), .in(pane)" = "engine/flow/panes.ts - map({ panes }), .in(pane)"

WG_PREFLIGHT_MISSING_KEY ​

readonly WG_PREFLIGHT_MISSING_KEY: object

WG_PREFLIGHT_MISSING_KEY.fix ​

readonly fix: "Pass --data / a mem.set() call for that key, or registerMemStub + --mem-stub for a fake value." = "Pass --data / a mem.set() call for that key, or registerMemStub + --mem-stub for a fake value."

WG_PREFLIGHT_MISSING_KEY.means ​

readonly means: "A Flow/chain needs a MemKey that mem.set() never received before run() started." = "A Flow/chain needs a MemKey that mem.set() never received before run() started."

WG_PREFLIGHT_MISSING_KEY.where ​

readonly where: "engine/run/run.ts - preflight()" = "engine/run/run.ts - preflight()"

WG_READ_DUPLICATE ​

readonly WG_READ_DUPLICATE: object

WG_READ_DUPLICATE.fix ​

readonly fix: "Read each key in one Read Block per Checkpoint (an every-page Read Block counts for every Checkpoint)." = "Read each key in one Read Block per Checkpoint (an every-page Read Block counts for every Checkpoint)."

WG_READ_DUPLICATE.means ​

readonly means: "Two Read Blocks for the same page both read one key, so it has two answers." = "Two Read Blocks for the same page both read one key, so it has two answers."

WG_READ_DUPLICATE.where ​

readonly where: "engine/read/read-block.ts - readCheckpoint()" = "engine/read/read-block.ts - readCheckpoint()"

WG_READ_MISSING ​

readonly WG_READ_MISSING: object

WG_READ_MISSING.fix ​

readonly fix: "Check read.has(key) first, or read.missing / read.notes for why; add the field to the page's Read Block." = "Check read.has(key) first, or read.missing / read.notes for why; add the field to the page's Read Block."

WG_READ_MISSING.means ​

readonly means: "read.get(key) asked for a value the page did not show, or that no Read Block for this page reads." = "read.get(key) asked for a value the page did not show, or that no Read Block for this page reads."

WG_READ_MISSING.where ​

readonly where: "engine/read/read-page.ts - ReadPage.get()" = "engine/read/read-page.ts - ReadPage.get()"

WG_RUNGRAPH_MAX_STEPS ​

readonly WG_RUNGRAPH_MAX_STEPS: object

WG_RUNGRAPH_MAX_STEPS.fix ​

readonly fix: "Check the Block(s) involved in the loop; raise maxSteps only if the loop is genuinely intended." = "Check the Block(s) involved in the loop; raise maxSteps only if the loop is genuinely intended."

WG_RUNGRAPH_MAX_STEPS.means ​

readonly means: "A chain took more steps than maxSteps without reaching a Block with no .next() - almost always an unintended self-loop in branch()/next routing." = "A chain took more steps than maxSteps without reaching a Block with no .next() - almost always an unintended self-loop in branch()/next routing."

WG_RUNGRAPH_MAX_STEPS.where ​

readonly where: "engine/run/run.ts - runGraph()" = "engine/run/run.ts - runGraph()"

WG_RUNGRAPH_NOT_TERMINAL ​

readonly WG_RUNGRAPH_NOT_TERMINAL: object

WG_RUNGRAPH_NOT_TERMINAL.fix ​

readonly fix: "Add that Checkpoint to `terminals`, or fix the Block's resolve() - it landed somewhere the caller didn't expect." = "Add that Checkpoint to `terminals`, or fix the Block's resolve() - it landed somewhere the caller didn't expect."

WG_RUNGRAPH_NOT_TERMINAL.means ​

readonly means: "A Block with no .next() resolved to a Checkpoint that wasn't in the caller's declared `terminals` set." = "A Block with no .next() resolved to a Checkpoint that wasn't in the caller's declared `terminals` set."

WG_RUNGRAPH_NOT_TERMINAL.where ​

readonly where: "engine/run/run.ts - runGraph()" = "engine/run/run.ts - runGraph()"

WG_STATE_NEEDED ​

readonly WG_STATE_NEEDED: object

WG_STATE_NEEDED.fix ​

readonly fix: "Run the flow as an account that has the state (`map({ as })`), or put a step before it that sets it (`sets`)." = "Run the flow as an account that has the state (`map({ as })`), or put a step before it that sets it (`sets`)."

WG_STATE_NEEDED.means ​

readonly means: "A step landed on a page that `needs` a state (signed in) the run is not in." = "A step landed on a page that `needs` a state (signed in) the run is not in."

WG_STATE_NEEDED.where ​

readonly where: "engine/mem/state.ts - applyStates()" = "engine/mem/state.ts - applyStates()"

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed