Skip to content

feat: onAsyncIteratorObjectError, onReadableStreamError#1629

Merged
dinwwwh merged 2 commits into
middleapi:mainfrom
dinwwwh:dinwwwh/issue604
Jul 6, 2026
Merged

feat: onAsyncIteratorObjectError, onReadableStreamError#1629
dinwwwh merged 2 commits into
middleapi:mainfrom
dinwwwh:dinwwwh/issue604

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Jul 6, 2026

Copy link
Copy Markdown
Member

Fixes #604

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orpc Ready Ready Preview, Comment Jul 6, 2026 4:15am

@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown
More templates

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1629

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@1629

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1629

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@1629

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1629

@orpc/experimental-effect

npm i https://pkg.pr.new/@orpc/experimental-effect@1629

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@1629

@orpc/interop

npm i https://pkg.pr.new/@orpc/interop@1629

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1629

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1629

@orpc/next

npm i https://pkg.pr.new/@orpc/next@1629

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1629

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@1629

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@1629

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@1629

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@1629

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1629

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1629

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1629

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1629

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1629

commit: 3e7b1c9

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes — This PR adds onAsyncIteratorObjectError and onReadableStreamError lifecycle interceptors so errors thrown while consuming an async iterator or readable stream are observable by interceptors/middleware.

  • Add onAsyncIteratorObjectError interceptor — wraps returned AsyncIteratorObject outputs from options.next() and invokes a callback on iteration errors.
  • Add onReadableStreamError interceptor — wraps returned ReadableStream outputs from options.next() and invokes a callback on stream errors.
  • Export the new interceptors from @orpc/shared, @orpc/client, and @orpc/server.
  • Tighten error types in wrapAsyncIterator/wrapReadableStream from unknown to ThrowableError.
  • Update createProcedureClient to type reconcileError as (e: ThrowableError) => ....

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

Comment thread packages/shared/src/interceptor.ts Outdated
Comment thread packages/shared/src/interceptor.ts Outdated
Comment thread packages/shared/src/iterator.ts
@dinwwwh dinwwwh merged commit 5d50ef1 into middleapi:main Jul 6, 2026
9 checks passed
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.

EventInterator error is not caught by the onError interceptor

1 participant