Skip to content

fix(sdk/typescript): surface exec errors correctly on the bun runtime - #13395

Merged
marcosnils merged 1 commit into
dagger:mainfrom
marcosnils:bun_exec_error_fix
Jun 10, 2026
Merged

marcosnils merged 1 commit into
dagger:mainfrom
marcosnils:bun_exec_error_fix

Conversation

@marcosnils

@marcosnils marcosnils commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

The SDK bundle inlines node-fetch, whose Headers class extends URLSearchParams. Bun's non-standard URLSearchParams.prototype.toJSON made JSON.stringify throw while graphql-request constructed its ClientError, so failed execs surfaced as "Encountered an unknown error while requesting data via graphql" instead of the real
ExecError. Use Bun's native fetch instead, like the existing Deno carve-out, and add an end-to-end regression test for both runtimes.

Signed-off-by: Marcos Lilljedahl [email protected]

The SDK bundle inlines node-fetch, whose Headers class extends
URLSearchParams. Bun's non-standard URLSearchParams.prototype.toJSON
made JSON.stringify throw while graphql-request constructed its
ClientError, so failed execs surfaced as "Encountered an unknown
error while requesting data via graphql" instead of the real
ExecError. Use Bun's native fetch instead, like the existing Deno
carve-out, and add an end-to-end regression test for both runtimes.

Signed-off-by: Marcos Lilljedahl <[email protected]>
@marcosnils
marcosnils requested a review from a team as a code owner June 10, 2026 05:05
@marcosnils marcosnils modified the milestones: 1.0.0-beta.1, v0.21.5 Jun 10, 2026
@marcosnils
marcosnils requested a review from TomChv June 10, 2026 05:06
@marcosnils
marcosnils merged commit 6dcfebc into dagger:main Jun 10, 2026
79 checks passed
marcosnils added a commit that referenced this pull request Jun 10, 2026
…#13395)

The SDK bundle inlines node-fetch, whose Headers class extends
URLSearchParams. Bun's non-standard URLSearchParams.prototype.toJSON
made JSON.stringify throw while graphql-request constructed its
ClientError, so failed execs surfaced as "Encountered an unknown
error while requesting data via graphql" instead of the real
ExecError. Use Bun's native fetch instead, like the existing Deno
carve-out, and add an end-to-end regression test for both runtimes.

Signed-off-by: Marcos Lilljedahl <[email protected]>
@marcosnils
marcosnils deleted the bun_exec_error_fix branch July 18, 2026 03:17
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
dagger 0.21.5

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## v0.21.5 - 2026-06-10

### Added

- Added expand option to container.exists by @alexcb in dagger/dagger#13310
- Support both Dang v1 and v2, routed by module engineVersion by @vito in dagger/dagger#13388

### Changed

- Prune local cache during disk pressure by @sipsma in dagger/dagger#13375
- Persist trivial core objects by @sipsma in dagger/dagger#13387

### Fixed

- Correct namespaced type-name mangling and cross-dependency interface dispatch in Dang by @vito in dagger/dagger#13377
- Surface exec errors correctly on the Bun runtime in the TypeScript SDK by @marcosnils in dagger/dagger#13395
- Ignore host xattrs for local filesync import identity by @sipsma in dagger/dagger#13389
- Don't shallow-clone the user's repo for git telemetry labels by @marcosnils in dagger/dagger#13363
- Preserve pending lazy container parents by @sipsma in dagger/dagger#13365
- Preserve withChanges parent layers by @dagger-codex[bot] + @shykes in dagger/dagger#13342
- Treat incomplete image metadata as cache miss by @sipsma in dagger/dagger#13346
- Cache registry image metadata by @dagger-codex[bot] + @shykes in dagger/dagger#13341
- Don't require id field for interface conformance in Dang by @vito in dagger/dagger#13318
- Use module-local check names for scale-out by @dagger-codex[bot] + @tiborvass in dagger/dagger#13329
- Fix snapshot owner lease attach/remove race by @sipsma in dagger/dagger#13321
- Follow source symlinks when copying directory contents in layercopy by @marcosnils in dagger/dagger#13326

### What to do next?

- Read the [documentation](https://docs.dagger.io)
- Join our [Discord server](https://discord.gg/dagger-io)
- Follow us on [Twitter](https://twitter.com/dagger_io)

</pre>
  <p>View the full release notes at <a href="https://github.com/dagger/dagger/releases/tag/v0.21.5">https://github.com/dagger/dagger/releases/tag/v0.21.5</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!11205
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.

2 participants