Skip to content

fix(next): use built-in unstable_rethrow for better compatibility#1668

Merged
dinwwwh merged 2 commits into
middleapi:mainfrom
dinwwwh:fix/next/improve-compatibility-by-using-unstable-rethrw
Jul 14, 2026
Merged

fix(next): use built-in unstable_rethrow for better compatibility#1668
dinwwwh merged 2 commits into
middleapi:mainfrom
dinwwwh:fix/next/improve-compatibility-by-using-unstable-rethrw

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Jul 13, 2026

Copy link
Copy Markdown
Member

Instead of manually rethrow error should be handled by next.js - use built-in helper instead.

Instead of manually rethrow error should be handled by next.js - use
built-in helper instead.
@vercel

vercel Bot commented Jul 13, 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 13, 2026 1:25pm

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026

Copy link
Copy Markdown
More templates

@orpc/arktype

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

@orpc/bun

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

@orpc/client

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

@orpc/cloudflare

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

@orpc/contract

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

@orpc/experimental-effect

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

@orpc/evlog

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

@orpc/json-schema

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

@orpc/nest

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

@orpc/next

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

@orpc/openapi

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

@orpc/opentelemetry

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

@orpc/pino

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

@orpc/publisher

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

@orpc/ratelimit

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

@orpc/server

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

@orpc/shared

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

@orpc/tanstack-query

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

@orpc/valibot

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

@orpc/zod

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

commit: 95f7581

@codecov

codecov Bot commented Jul 13, 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
Contributor

Choose a reason for hiding this comment

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

ℹ️ Minor lockfile cleanup needed; the code change is correct and tests pass.

Reviewed changes — replaced the manual Next.js error detection in createServerFunction with the built-in unstable_rethrow helper and bumped the Next.js dev dependency.

  • Switch server-function.ts to unstable_rethrow — delegates rethrowing framework-internal errors (router, redirects, PPR postpone, dynamic server, etc.) to Next.js instead of the narrower error.digest.startsWith('NEXT_') check.
  • Bump next to ^16.2.10 in packages/next and playgrounds/next dev dependencies; lockfile regenerated accordingly.
  • existing tests already cover redirect, forbidden, unauthorized, and notFound rethrow behavior and continue to pass.

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

Comment thread pnpm-lock.yaml Outdated
@dinwwwh dinwwwh merged commit 9eea7b9 into middleapi:main Jul 14, 2026
13 of 14 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.

1 participant