Skip to content

Improve error cause logging - #840

Merged
chiragjn merged 4 commits into
mainfrom
cj-improve-error-logging
Sep 22, 2026
Merged

chiragjn merged 4 commits into
mainfrom
cj-improve-error-logging

Conversation

@chiragjn

@chiragjn chiragjn commented Sep 22, 2026

Copy link
Copy Markdown
Member

Note

Low Risk
Observability and user-facing error text only; no auth, data, or sandbox execution semantics changed beyond clearer messages and logging.

Overview
Improves diagnostics when TrueFoundry sandbox HTTP calls fail, so operators and agent steps see actionable detail instead of generic undici fetch failed text.

describeUnknownError and extractErrorLogFields now walk nested Error.cause (with cycle detection and de-duplication when the head message already contains the tail). That propagates to other callers (e.g. agent turn errors, LLM errors), not only the sandbox provider.

TFYSandboxProvider threads the exec / upload URL into error strings and structured logs, uses describeUnknownError for exec and upload network failures (upload rethrows with cause preserved), and adds info logs when sandbox file uploads start and finish (sandbox id, path, byte count).

OpenAPI metadata is bumped to 0.2.1; a patch changeset documents the @truefoundry/trueforge-core release note.

Reviewed by Cursor Bugbot for commit 0c875ba. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0c875ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge-core Patch
@truefoundry/trueforge Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f87c445. Configure here.

Comment thread packages/trueforge-core/src/core/util/errorLogFields.ts
@chiragjn
chiragjn merged commit 1b1050a into main Sep 22, 2026
11 checks passed
@chiragjn
chiragjn deleted the cj-improve-error-logging branch September 22, 2026 09:50
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