Skip to content

Fix tus upload rejection handling#438

Merged
kvz merged 1 commit into
mainfrom
tus-rejection
Jun 18, 2026
Merged

Fix tus upload rejection handling#438
kvz merged 1 commit into
mainfrom
tus-rejection

Conversation

@kvz

@kvz kvz commented Jun 18, 2026

Copy link
Copy Markdown
Member

Why

API2 PagerDuty incident Q33YSSJS2BXHOF exposed that a transient tus create-upload failure can reject the caller-facing startPromise and also leave the SDK's internal upload URL/completion bookkeeping promises rejected without handlers. In API2 that second, duplicate rejection reached the process-wide unhandledRejection handler after the original createAssembly() failure had already been caught and reported.

Changes

  • Attach handlers to tus upload bookkeeping promises when they are created, so the caller still receives the primary upload failure while duplicate internal rejections do not become unhandled.
  • Add a regression test that fails before the fix by observing two unhandled rejections after a simulated tus onError.
  • Add patch changesets for @transloadit/node, @transloadit/mcp-server, and transloadit per release-coupling policy.

Tests

  • yarn workspace @transloadit/node test:unit --run ./test/unit/tus.test.ts
  • yarn check

Related API2 pager PR: https://github.com/transloadit/api2/pull/8307

@kvz kvz merged commit 9cf7aea into main Jun 18, 2026
23 of 24 checks passed
@kvz kvz deleted the tus-rejection branch June 18, 2026 21:11
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