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 695ca94
Browse filesBrowse the repository at this point in the historyBrowse files
improvement(workflows): a clean errorMessage on Function errors and table writes report ignored columns (#10328)
Function blocks that fail now also output errorMessage, the thrown message without the line/code prefix, alongside the unchanged .error; it is declared as a typed error-only output that compile, lint, codegen and the executor read wherever .error is. Table writes return ignoredColumns, the keys they dropped because no column matched, with runtime write behaviour unchanged.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/integrations/table.mdx
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@ Insert a new row into a table. IMPORTANT: You must use the "data" parameter (not
52
52
53
53
| Parameter | Type | Description |
54
54
| --------- | ---- | ----------- |
55
+
|`ignoredColumns`| array | Keys of the written data that name no column of the table, which the write dropped. Empty when every key matched a column. |
55
56
|`success`| boolean | Whether row was inserted |
56
57
|`row`| json | Inserted row data |
57
58
|`message`| string | Status message |
@@ -75,6 +76,7 @@ Insert multiple rows into a table at once (up to 1000 rows)
75
76
76
77
| Parameter | Type | Description |
77
78
| --------- | ---- | ----------- |
79
+
|`ignoredColumns`| array | Keys of the written data that name no column of the table, which the write dropped. Empty when every key matched a column. |
78
80
|`success`| boolean | Whether rows were inserted |
79
81
|`rows`| array | Inserted rows data |
80
82
|`insertedCount`| number | Number of rows inserted |
@@ -100,6 +102,7 @@ Insert or update a row based on unique column constraints. If a row with matchin
100
102
101
103
| Parameter | Type | Description |
102
104
| --------- | ---- | ----------- |
105
+
|`ignoredColumns`| array | Keys of the written data that name no column of the table, which the write dropped. Empty when every key matched a column. |
103
106
|`success`| boolean | Whether row was upserted |
104
107
|`row`| json | Upserted row data |
105
108
|`operation`| string | Operation performed: insert or update |
@@ -125,6 +128,7 @@ Update an existing row in a table. Supports partial updates - only include the f
125
128
126
129
| Parameter | Type | Description |
127
130
| --------- | ---- | ----------- |
131
+
|`ignoredColumns`| array | Keys of the written data that name no column of the table, which the write dropped. Empty when every key matched a column. |
128
132
|`success`| boolean | Whether row was updated |
129
133
|`row`| json | Updated row data |
130
134
|`message`| string | Status message |
@@ -150,6 +154,7 @@ Update multiple rows that match filter criteria. Data is merged with existing ro
150
154
151
155
| Parameter | Type | Description |
152
156
| --------- | ---- | ----------- |
157
+
|`ignoredColumns`| array | Keys of the written data that name no column of the table, which the write dropped. Empty when every key matched a column. |
153
158
|`success`| boolean | Whether rows were updated |
154
159
|`updatedCount`| number | Number of rows updated |
Copy file name to clipboardExpand all lines: apps/docs/content/docs/tables/using-in-workflows.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,8 @@ Use **Get Row by ID** for a point lookup and **Get Schema** for column definitio
126
126
}
127
127
```
128
128
129
+
A key that names no column is dropped, and the write still succeeds. Every insert, upsert, and update reports the dropped keys in `<table.ignoredColumns>`, an empty list when every key matched, so a downstream condition can catch a misspelled column. Public v2 API writes reject an unknown column instead.
130
+
129
131
Upsert requires a unique column. If the table has several, select **Conflict Column** to choose the match target. Unlisted fields remain unchanged in a partial update.
130
132
131
133
For different results per row, use a sequential Loop and **Update Row by ID**. A filter update applies the same values to every match; with no **Limit**, it walks all matches in batches. The 1,000 maximum applies to an explicitly supplied update limit, not the total for an unlimited filtered update.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/workflows/blocks/function.mdx
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,6 +435,15 @@ The lazy `sim.files` and `sim.values` helpers are available only in JavaScript f
435
435
436
436
An uncaught error follows the connected error port or fails the run. Catch an error only when your code can return a meaningful recovery result. `console.log()`, `print()`, and ordinary Shell output appear in `stdout` and the run logs.
437
437
438
+
On the error path, the failed block has two outputs:
439
+
440
+
| Output | What it is |
441
+
| --- | --- |
442
+
|`<function.error>`| The message with the line and code that threw: ``Line 4: `throw new Error('invalid phone')` - invalid phone``|
443
+
|`<function.errorMessage>`| The thrown message alone: `invalid phone`|
444
+
445
+
Use `<function.errorMessage>` in a reply to a caller, such as a Response block's body, so the caller never sees your code. Use `<function.error>` when you need the line to debug. A failure your code did not throw, such as a timeout, has no line, so both hold the same message.
446
+
438
447
Function uses the workflow's remaining execution time when a deadline exists. Without a workflow deadline, it still has a fallback timeout of 300,000 ms (5 minutes) by default, configurable through `EXECUTION_TIMEOUT_FREE`. An explicit internal timeout can replace that fallback or shorten the workflow budget; it cannot extend the workflow deadline. There is no separate timeout field in the current block editor. Exceeding the budget terminates execution and reports a block error.
0 commit comments