Skip to content

improvement(workflows): a clean errorMessage on Function errors and table writes report ignored columns - #10328

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/function-error-message-table-ignored-columns
Nov 23, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
improvement/function-error-message-table-ignored-columns

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A failed Function block also outputs errorMessage: the thrown message without the Line N: `code` - prefix and type label that error carries, so a workflow can reply to a caller (<fn.errorMessage>) without exposing its code. error is unchanged byte for byte.
  • Covers isolated-vm, E2B JavaScript and Python, and failures before the code runs. A failure the route never reported (timeout, kill) repeats error, so <fn.errorMessage> is never empty on the error path.
  • Declared through a new BlockConfig.errorOutputs field, read everywhere the implicit error is: catalog, workflow-code compile (accepted with an onError edge, W_OUTPUT_PATH_UNDECLARED without, W_UNKNOWN_OUTPUT_PATH on blocks that don't declare it), JSON-field typing, lint, SDK types (Block<O, E>) and the executor reference schema (resolves empty after a success, like error)
  • Same masking as error: the value sits in the same error output, gets the same provenance scan, and a database failure masks both
  • Table block writes (insert, batch insert, upsert, update, update by filter) output ignoredColumns: data keys naming no column, which the lenient workflow write drops. Always an array ([] when every key matched), so it's referenceable without a null guard. The table use cases compute it where the keys get dropped. Stored rows and the grid / v2 routes are unchanged.
  • Docs: the primer, cookbook, operations apply --help, SYNTAX.md and runtime semantics; the Function block and tables docs

Type of Change

  • Improvement

Testing

  • Route: .error stays byte-identical across 16 error shapes (pinned exactly and confirmed against the staging route; only the errorMessage assertions fail there): runtime/TypeError/syntax, non-Error throws, multi-line, no line, resolved values, E2B JS/Python
  • Executor: <fn.errorMessage> reaches a downstream Response over an error edge, is recorded without an edge, falls back to error, and resolves empty after a success
  • Real Postgres ignored-columns.integration.ts covers none / some / all keys unknown, batch, upsert insert/update, update, and update by filter. It checks stored rows too.
  • Tests for workflow-code checks, lint, SDK negative fixture and tool secret masking. Each new test fails on the pre-fix code.
  • Gate: tsc for every workspace; every package suite; apps/sim units; apps/sim integration (mig + push); goldens; check:audits; check:test-types; check:migrations; docs compatibility; lint; root type-check; check-block-registry; test:scripts
  • Expected golden changes: the SDK fixture catalog (function errorOutputs), generated tool outputs, table docs, CLI help docs, and the v2 source-catalog OpenAPI (optional errorOutputs)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…able writes report ignored columns

A failed Function block now also outputs errorMessage: the thrown message
without the Line N: `code` - prefix and type label that error carries, so a
workflow can reply to a caller without leaking its code. error is unchanged.
Declared through a new BlockConfig errorOutputs field that the catalog,
compiler, lint, SDK types and executor reference schema read the way they
read the implicit error output.

Table block writes (insert, batch insert, upsert, update, update by filter)
now output ignoredColumns: the data keys naming no column, which the lenient
workflow write drops. Computed by the table use cases where the keys are
dropped; stored rows are unchanged.
…on-error-message-table-ignored-columns

# Conflicts:
#	packages/workflow-code/src/compile/values.ts
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 23, 2026 1:50am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

Adds errorMessage to failed Function blocks and ignoredColumns to Table writes.

  • Failed Function blocks give workflows a plain error message to use in replies.
  • Workflow table writes report keys that do not match table columns.

Reviews (2) · Last reviewed commit: "fix(function): drop Node's bracketed cod..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 58 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/tools/index.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 58 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 695ca94 into staging Nov 23, 2026
87 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/function-error-message-table-ignored-columns branch November 23, 2026 02:11

This branch was previously deployed

1 inactive deployment
Preview — cf7fd874 Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant