Skip to content

Squash Effect Cause before Sentry.captureException#522

Merged
RhysSullivan merged 1 commit intomainfrom
fix/sentry-cause-capture
May 4, 2026
Merged

Squash Effect Cause before Sentry.captureException#522
RhysSullivan merged 1 commit intomainfrom
fix/sentry-cause-capture

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

Summary

  • Sentry's captureException can't extract an Error from an Effect Cause, so it logs a 'CauseImpl' captured as exception with keys: reasons, ~effect/Cause event instead of the real failure.
  • Three call sites passed a Cause directly: the catchCause handlers in mcp.ts and mcp-session.ts, and the unknown-typed helpers in error-response.ts that catchCause callers in api/autumn.ts and api/slack.ts feed into.
  • Each site now squashes the cause for the exception payload and attaches Cause.pretty(...) as a cause extra, matching the pattern already used in observability.ts.

Test plan

  • Trigger an error on POST /mcp and confirm Sentry shows the underlying failure (with cause extra) rather than the CauseImpl captured as exception warning.
  • Trigger an error on /autumn/* or /slack/* and confirm the same.

Sentry's captureException can't extract an Error from an Effect Cause
and logs a 'CauseImpl captured as exception' warning event instead of
the underlying failure. Three call sites were passing a Cause directly:
two catchCause handlers in mcp.ts/mcp-session.ts, and the unknown-typed
helpers in error-response.ts that catchCause callers feed into.

Squash to a real value for the exception payload and attach the
pretty-printed cause as a 'cause' extra, matching the pattern already
used in observability.ts.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 362c5ab Commit Preview URL

Branch Preview URL
May 04 2026, 08:00 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 362c5ab May 04 2026, 08:01 PM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 4, 2026

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@522

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@522

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@522

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@522

@executor-js/storage-core

npm i https://pkg.pr.new/@executor-js/storage-core@522

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@522

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@522

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@522

@executor-js/plugin-google-discovery

npm i https://pkg.pr.new/@executor-js/plugin-google-discovery@522

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@522

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@522

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@522

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@522

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@522

executor

npm i https://pkg.pr.new/executor@522

commit: 362c5ab

@RhysSullivan RhysSullivan merged commit 59df56a into main May 4, 2026
9 checks passed
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