|
| 1 | +--- |
| 2 | +"@objectstack/docs": patch |
| 3 | +--- |
| 4 | + |
| 5 | +fix(docs): four pages enumerating the flow refusal codes now name `FLOW_INPUT_SCHEMA_INVALID` (#13720) |
| 6 | + |
| 7 | +`FlowRefusalCode` gained a fourth member in `packages/runtime/src/flow-dispatch-status.ts` |
| 8 | +(`b6d3d76b5`), answered `422` and classified never-dispatched. Three pages were updated with |
| 9 | +it; four others enumerate the same union and were not, so each stated the enumeration as |
| 10 | +**complete** while it was one code short — a teaching surface telling a reader that a status |
| 11 | +they will really receive does not exist. |
| 12 | + |
| 13 | +| page | the row that was short | |
| 14 | +|:---|:---| |
| 15 | +| `content/docs/api/declarative-endpoints.mdx` | the `type: 'flow'` delegation row | |
| 16 | +| `content/docs/api/plugin-endpoints.mdx` | `POST /automation/:name/trigger` | |
| 17 | +| `content/docs/protocol/kernel/http-protocol.mdx` | the declared-endpoint `type: 'flow'` answer row | |
| 18 | +| `content/docs/ui/actions.mdx` | the `type: 'flow'` over-REST row | |
| 19 | + |
| 20 | +Prose only — no schema, no runtime behaviour and no generated artifact moves. The two |
| 21 | +generated reference pages (`references/api/contract.mdx`, |
| 22 | +`references/api/error-code-ledger.mdx`) already carried the code, which is why the |
| 23 | +generator needed nothing here. |
| 24 | + |
| 25 | +**Which group the new code joins was read off the source, not inferred from the status.** |
| 26 | +`classifyFlowRefusal` tests `FLOW_INPUT_SCHEMA_INVALID` inside the |
| 27 | +`── never dispatched: the producer says WHICH refusal ──` arm block, above the |
| 28 | +`result.status === 'failed'` arm that answers `400 FLOW_FAILED`. `ui/actions.mdx` is the |
| 29 | +one page that splits its enumeration into "a run that ran and was rejected" versus "a |
| 30 | +dispatch that never happened", so the code is placed in the second group there; putting it |
| 31 | +beside `FLOW_FAILED` would have said the run started. |
| 32 | + |
| 33 | +`422` is now carried by two codes (`FLOW_NO_START_NODE` and `FLOW_INPUT_SCHEMA_INVALID`). |
| 34 | +Each page spells the status together with its code, so every entry stays a self-contained |
| 35 | +pair rather than a claim about what `422` alone means — the discriminator is `error.code`, |
| 36 | +which is what `http-protocol.mdx` already tells readers to branch on. The full table with |
| 37 | +per-code guidance stays where it is, in `content/docs/automation/flows.mdx`. |
0 commit comments