Skip to content

Export HttpClient.isTransientError and isTransientResponse - #9059

Merged
tim-smart merged 3 commits into
Effect-TS:v4/next-minorfrom
Tarekkharsa:http-export-transient-predicates
Oct 12, 2026
Merged

tim-smart merged 3 commits into
Effect-TS:v4/next-minorfrom
Tarekkharsa:http-export-transient-predicates

Conversation

@Tarekkharsa

@Tarekkharsa Tarekkharsa commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

retryTransient decides what to retry with two private predicates: a timeout, a transport error, or a status code error whose response is 408, 429, 500, 502, 503 or 504. Code that builds its own policy over an HttpClient, such as a custom retry schedule or a circuit breaker, has to copy that list, and the copy drifts from retryTransient.

This PR exports both predicates unchanged as HttpClient.isTransientError and HttpClient.isTransientResponse, @stability unstable, with JSDoc that links them to retryTransient. The changeset is minor, because the change only adds exports.

Validation:

  • pnpm lint-fix
  • pnpm test --run packages/effect/test/http/HttpClient.test.ts
  • pnpm jsdocs --check
  • pnpm doctest --run packages/effect/src/http/HttpClient.ts
  • pnpm lint
  • pnpm check

🤖 Generated with Claude Code

Closes EFF-2019

@changeset-bot

changeset-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d0f5782

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

This PR includes changesets to release 32 packages
Name Type
effect Minor
@effect/opentelemetry Minor
@effect/vitest Minor
@effect/ai-anthropic Minor
@effect/ai-cloudflare Minor
@effect/ai-openai-compat Minor
@effect/ai-openai Minor
@effect/ai-openrouter Minor
@effect/ai-typesafe Minor
@effect/atom-react Minor
@effect/atom-solid Minor
@effect/atom-vue Minor
@effect/platform-browser Minor
@effect/platform-bun Minor
@effect/platform-deno Minor
@effect/platform-node-shared Minor
@effect/platform-node Minor
@effect/sql-clickhouse Minor
@effect/sql-d1 Minor
@effect/sql-libsql Minor
@effect/sql-mssql Minor
@effect/sql-mysql2 Minor
@effect/sql-pg Minor
@effect/sql-pglite Minor
@effect/sql-sqlite-bun Minor
@effect/sql-sqlite-do Minor
@effect/sql-sqlite-node Minor
@effect/sql-sqlite-react-native Minor
@effect/sql-sqlite-wasm Minor
@effect/docgen Minor
@effect/doctest Minor
@effect/openapi-generator Minor

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

@effect-bot
effect-bot changed the base branch from main to v4/next-minor October 12, 2026 10:42
retryTransient decides what to retry with two private predicates. Code
that builds its own retry policy or a circuit breaker over an HttpClient
had to copy the status list and the error rules, and could drift from
retryTransient. Both predicates are now public, unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tarekkharsa
Tarekkharsa force-pushed the http-export-transient-predicates branch from 2727c58 to 4ff38e6 Compare October 12, 2026 10:48
@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 38.88 KB 38.88 KB 0.00 KB (0.00%)
basic.ts 7.11 KB 7.11 KB 0.00 KB (0.00%)
batching.ts 10.20 KB 10.20 KB 0.00 KB (0.00%)
brand.ts 6.73 KB 6.73 KB 0.00 KB (0.00%)
cache.ts 10.96 KB 10.96 KB 0.00 KB (0.00%)
config.ts 22.36 KB 22.36 KB 0.00 KB (0.00%)
differ.ts 21.40 KB 21.40 KB 0.00 KB (0.00%)
http-client.ts 22.77 KB 22.77 KB 0.00 KB (0.00%)
http-router.ts 34.21 KB 34.21 KB 0.00 KB (0.00%)
logger.ts 11.28 KB 11.28 KB 0.00 KB (0.00%)
metric.ts 9.08 KB 9.08 KB 0.00 KB (0.00%)
optic.ts 6.96 KB 6.96 KB 0.00 KB (0.00%)
pubsub.ts 15.28 KB 15.28 KB 0.00 KB (0.00%)
queue.ts 12.21 KB 12.21 KB 0.00 KB (0.00%)
schedule.ts 11.30 KB 11.30 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 13.82 KB 13.82 KB 0.00 KB (0.00%)
schema-binary.ts 40.07 KB 40.07 KB 0.00 KB (0.00%)
schema-class.ts 21.16 KB 21.16 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 32.20 KB 32.20 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 27.37 KB 27.37 KB 0.00 KB (0.00%)
schema-string-transformation.ts 14.58 KB 14.58 KB 0.00 KB (0.00%)
schema-string.ts 12.09 KB 12.09 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.15 KB 16.15 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 38.41 KB 38.41 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 25.41 KB 25.41 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 20.32 KB 20.32 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 20.52 KB 20.52 KB 0.00 KB (0.00%)
schema-toFormatter.ts 20.63 KB 20.63 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 25.10 KB 25.10 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 20.61 KB 20.61 KB 0.00 KB (0.00%)
schema.ts 20.37 KB 20.37 KB 0.00 KB (0.00%)
stm.ts 13.33 KB 13.33 KB 0.00 KB (0.00%)
stream.ts 10.04 KB 10.04 KB 0.00 KB (0.00%)

@tim-smart
tim-smart merged commit f3dcd53 into Effect-TS:v4/next-minor Oct 12, 2026
9 checks passed
tim-smart pushed a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
effect-bot added a commit that referenced this pull request Oct 13, 2026
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Effect Bot <tech-ops@effectful.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants