fix(start): reject non-ok JSON server function responses #8283
Opendvd233(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/8283/headopened dvd233(GitHub profile, opens in a new tab) linked this to fix #8280
Sign in to join this conversation.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Team
Run ID:
6a782757-cec9-4ed5-ba6f-9f700b993035📥 Commits
Reviewing files that changed from the base of the PR and between aee42c6b641d8e919bfed9e0f04bb1b72092f3a6 and bfaf6ab9af9cb7e1d8f4c2f2e3c8c52f1c955d8d.
📒 Files selected for processing (3)
.changeset/quiet-rivers-reject.mdpackages/start-client-core/src/client-rpc/serverFnFetcher.tspackages/start-client-core/tests/serverFnFetcher.test.tsIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
The server-function fetcher now rejects non-OK JSON responses with the serialized response body. Tests cover rejection for status 500 and successful parsing for OK responses. A patch changeset documents the behavior.
Changes#
Server-function response handling
packages/start-client-core/src/client-rpc/serverFnFetcher.ts,packages/start-client-core/tests/serverFnFetcher.test.ts,.changeset/quiet-rivers-reject.mdMerge Risk: ⚪ Minimal · up to
bfaf6Non-OK un-serialized JSON server-function responses now reject rather than resolve with an error body, while successful JSON responses and redirect/not-found behavior remain preserved. No current merge-blocking risk remains.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
#8280by rejecting non-OK, non-serialized JSON responses with the response payload while preserving successful JSON handling. Regression tests cover both the failing…✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share