Repository navigation
fix(service-automation): try_catch Error Variable help describes the caught error in words - #24655
Conversation
…the caught error in words The node descriptor's errorVariable description named a TypeScript type and left out the platform error code the engine binds. It now says what the value carries (the Try / Catch node's id, the failure message, the error code when the failing step reported one, and the loop pass and item inside a loop), with no type name. Claude-Session: https://claude.ai/code/session_01LR1cD9JqgkeqY7k9rrZH8s Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0bf1fa88bed593a3c4261002b82fca6f5de0b439 && git checkout 0bf1fa88bed593a3c4261002b82fca6f5de0b439
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f89d29e382e7d50cfe1b2a98742ac1c3d436cd26 f967f573b757bbf0118b360469c6afda5ed20840 && git checkout -B drift-repro f89d29e382e7d50cfe1b2a98742ac1c3d436cd26 && git merge --no-ff f967f573b757bbf0118b360469c6afda5ed20840
node scripts/docs-audit/affected-docs.mjs --json f89d29e382e7d50cfe1b2a98742ac1c3d436cd26 |
席位核对ACCEPT · #24576 ·
Generated by Claude Code |
Fixes #24576
Clause-②: no
The Error Variable help the Studio flow inspector shows for a Try / Catch node no longer names a TypeScript type. The text is the
try_catchdescriptor's ownerrorVariabledescription (packages/services/service-automation/src/builtin/try-catch-node.ts,configSchema); this PR rewrites that one string in words and adds a patch changeset for@objectstack/service-automation.New text, as served by the descriptor:
What the engine really binds (measured before writing)
A throwaway probe on the real
AutomationEngine(probe file deleted, not committed) ran atry_catchwhose try region holds one failing steppush_step, and printed$errorfrom the catch region:nodeId: guard,message: Node 'push_step' failed: boomDUPLICATE_RECORDcode: DUPLICATE_RECORDiteration: 0,item: { id: 'r1' }Two consequences for the wording:
nodeIdis the Try / Catch node's own id (guard), not the failing inner step (push_step). The inner step is named insidemessage. The help therefore says "the id of this Try / Catch node" and "the failure message, which normally names the step that failed", and does not say "the failing node" as the triage comment words it.code, which the engine has bound for a while; the new text names it, so an author learns a catch region can branch on it.Verification
origin/main7c7741dcbline 75 oftry-catch-node.tsnames the type, as the card says.engine.getActionDescriptor('try_catch'): a PascalCase identifier scan returns null on the new text andTryCatchErrorValueon the old text (control leg).@objectstack/service-automation:tsc --noEmitpluscheck:test-typecheckexit 0; full suite 193 files / 2580 tests passed (run atf967f573b, under the shared verify lock).dispatch-gates --commandsderives for this diff were run; 58 exit 0 and the--ranreconciliation reads 59 accounted, 0 unrun. One is NOT MEASURED:check:dual-build-cjs-loadsexits 3 (prerequisite not met, it needs every workspace package'sdist/and only the service-automation closure was built); CI'sBuild Corehosts it.Acceptance notes
try_catchdescriptor's help text (the closest pins,notify-node.test.tsandhttp-nodes.test.ts, are for other nodes); the change is one string and the existing suite stays green.packages/spec/**is untouched. The spec's ownerrorVariabledescribe still says "The value is aTryCatchErrorValue"; the surfaces that describe reaches are listed in the report comment on try_catch node: the Studio flow inspector's Error Variable help text names a TypeScript type (TryCatchErrorValue) #24576 for the seat to file.notify,screen) already carry{{ }}examples in help text.Generated by Claude Code