Skip to content

docs(sdk): retry config, resumable downloads, UploadSessionExpiredError#70

Merged
rubenhensen merged 1 commit intomainfrom
docs/postguard-js-retry-and-resume
May 8, 2026
Merged

docs(sdk): retry config, resumable downloads, UploadSessionExpiredError#70
rubenhensen merged 1 commit intomainfrom
docs/postguard-js-retry-and-resume

Conversation

@dobby-coder
Copy link
Copy Markdown
Contributor

@dobby-coder dobby-coder Bot commented May 7, 2026

Closes #68.

Summary

  • docs/sdk/js-encryption.md: new "Retry options" section documenting PostGuardConfig.retry (defaults: 5 attempts, 500 ms initial delay, 30 s cap, 2× multiplier, full jitter), per-phase timeouts (chunkTimeoutMs, finalizeTimeoutMs, downloadTimeoutMs), retry classification rules, the onRetry hook + RetryEvent shape, and the note that initUpload and finalizeUpload are deliberately not retried.
  • docs/sdk/js-decryption.md: new "Retries and resumable downloads" section covering the Range-based resume, the 206 Partial Content requirement, the silent-rewind protection (200 OK on resume → fail-not-retry), the shared retry budget across resumes, and the v1.6 behaviour change where downloadFileWithRetry returns its ReadableStream synchronously.
  • docs/sdk/js-errors.md: new UploadSessionExpiredError row in the hierarchy and a section with properties (uuid, reason, status 404, body) plus a usage example.

Source verification

  • All symbols verified against encryption4all/postguard-js@a60716e (current main head).
  • Source links pinned to that hash and curl -sI checked — all return HTTP 200, line ranges match the cited content (RetryOptions interface, downloadRange resume logic, UploadSessionExpiredError class).
  • npm run docs:build succeeds; the new anchors render in dist/sdk/{js-encryption,js-decryption,js-errors}.html.

Reviewer quickstart

```
git fetch origin && git checkout docs/postguard-js-retry-and-resume && npm install && npm run docs:dev
```

Source PRs: encryption4all/postguard-js#47 (retry config + UploadSessionExpiredError) and encryption4all/postguard-js#52 (resumable downloads).

@rubenhensen rubenhensen merged commit 6b363b0 into main May 8, 2026
1 check passed
@rubenhensen rubenhensen deleted the docs/postguard-js-retry-and-resume branch May 8, 2026 07:47
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.

docs(postguard-js): document retry config, onRetry hook, resumable downloads, UploadSessionExpiredError

1 participant