Expose pull timeout on upload() and preserve HTTP status on PullError

Open
#1,058 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@hugomrdias is already working on this.

Since Oct 29, 2026.

Assessment

This issue has not been assessed yet.

Description

Follow-up from #799 (closed). The 429/503 + Retry-After handling it asked for is already covered by iso-web's default retry policy on both pull requests, and StorageContext.pull({ timeout }) is already public (default 2h). Two small gaps remain:

1. Expose the pull timeout on StorageManager.upload()

StorageContext.pull() accepts timeout, but StorageManager.upload() doesn't forward one to _pullToSecondariesWithRetry (packages/synapse-sdk/src/storage/manager.ts), so users on the golden path are stuck with the 2h default (RETRY_CONSTANTS.PULL_TIMEOUT).

2. Keep HTTP status info on PullError

In packages/synapse-core/src/sp/pull-pieces.ts, once retries are exhausted the HTTP error is turned into new PullError(await response.error.response.text()), which drops the status code and Retry-After. Callers can't tell a transient overload (429/503) from a permanent failure. PullError should carry the status (and retryAfter when present) so callers can implement their own backoff.

Dominant language
TypeScript
Stars
27
Forks
36
Avg merge
2d 4h
Merged PRs (30d)
65

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FilOzone/synapse-sdk

All issues in FilOzone/synapse-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.