You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a8dfd4e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(api): attribute a polled run's failure only to the block that caused it
A run's stored error was paired with any failed block in its trace when the
message classified as a generic failure, so a run-level fault or a branch that
failed after the settling error reported an unrelated block. The trace read now
names a block only when its name heads the run error or its recorded error is
exactly it, which keeps unprefixed loop and parallel failures attributed.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/api-reference/build-and-run-workflows.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,7 +259,7 @@ Run failures are reported in the result, not as HTTP errors: branch on `status`
259
259
260
260
## 10. Debug a failed run [#debugging]
261
261
262
-
A synchronous execute response names the failing block in `error.blockId`, `error.blockName`, and `error.blockType`. The polled run resource cannot attribute a block; read the run's trace spans instead:
262
+
Both the execute response and the polled run resource name the failing block in `error.blockId`, `error.blockName`, and `error.blockType`. The run resource reads these from the run's trace, so they are absent when the trace is unavailable or hidden by your organization's permission groups, when no failed block in the trace recorded the run error, and for a timeout, cancellation, usage-limit, or invalid-input failure. Read the trace spans for the full picture:
Copy file name to clipboardExpand all lines: apps/docs/openapi-v2-workflows.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15539,7 +15539,7 @@
15539
15539
"description": "Stable machine-readable execution failure code. `BLOCK_EXECUTION_FAILED` and `CHILD_WORKFLOW_FAILED` are reported only where block attribution is available; elsewhere a block-level failure is reported as `EXECUTION_FAILED`."
15540
15540
},
15541
15541
"blockId": {
15542
-
"description": "Identifier of the failing block, when attributable. Get workflow run reads it from the run trace, so it is absent there when the trace is unavailable or hidden by organization permission groups, and for a timeout, cancellation, usage-limit, or invalid-input failure.",
15542
+
"description": "Identifier of the failing block, when attributable. Get workflow run reads it from the run trace, so it is absent there when the trace is unavailable or hidden by organization permission groups, when no failed block in the trace recorded the run error, and for a timeout, cancellation, usage-limit, or invalid-input failure.",
Copy file name to clipboardExpand all lines: apps/sim/lib/api/contracts/v2/workflows.ts
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1550,8 +1550,9 @@ export const v2ExecutionErrorSchema = z
1550
1550
* The synchronous execute and resume responses attribute the block at
1551
1551
* execution time. The polled run resource keeps only the error *string*, so
1552
1552
* it reads the block back from the run's recorded trace: the unhandled
1553
-
* failure the stored error names, else the one that ended first, and none
1554
-
* when concurrent failures cannot be told apart. When that trace is unavailable (not
1553
+
* failure that recorded the stored error (named by it, or with the same
1554
+
* text), the one that ended first among several, and none when they cannot
1555
+
* be told apart or no failed block recorded it. When that trace is unavailable (not
1555
1556
* recorded, compacted, or withheld by the viewer's permission group) the
1556
1557
* three fields are absent and a block-level failure reports
1557
1558
* `EXECUTION_FAILED`. A failure its message classifies as run-level
@@ -1562,7 +1563,7 @@ export const v2ExecutionErrorSchema = z
1562
1563
.string()
1563
1564
.optional()
1564
1565
.describe(
1565
-
'Identifier of the failing block, when attributable. Get workflow run reads it from the run trace, so it is absent there when the trace is unavailable or hidden by organization permission groups, and for a timeout, cancellation, usage-limit, or invalid-input failure.'
1566
+
'Identifier of the failing block, when attributable. Get workflow run reads it from the run trace, so it is absent there when the trace is unavailable or hidden by organization permission groups, when no failed block in the trace recorded the run error, and for a timeout, cancellation, usage-limit, or invalid-input failure.'
0 commit comments