Commit b7ee914
committed
docs(automation): document structured errors from ctx.api in hook bodies
The docs-drift check on #3937 flagged `automation/hook-bodies.mdx`. Nothing
there was made stale by this branch, but the page is the reference for what a
sandboxed body gets from `ctx.api`, and this branch gives it something new: a
rejected call now carries `code` and `fields` alongside `name`/`message`.
Adds a short "Errors from ctx.api" section under nested cross-object writes,
covering the two properties, the worked `VALIDATION_FAILED` case, the fact that
the passthrough is a deliberate ALLOWLIST (body code can read anything on a
rejection, so host errors must not arrive with driver state or record payloads
attached), and that an escaping or re-thrown error keeps the payload on the way
back out to the action's HTTP response.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeZ7DmSKjiKmQzYh8L5CJS1 parent f30370c commit b7ee914
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
154 | 179 | | |
155 | 180 | | |
156 | 181 | | |
| |||
0 commit comments