Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe client now rejects untagged, non-JSON server function responses by throwing their body text. Tests cover 200 and 403 responses and preserve raw ChangesServer function response handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The intended handling for intermediary non-JSON responses is implemented with coverage for the primary response paths. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)
✨ 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. Comment |
🎯 Changes
Fixes #8333.
When something between the browser and the server answers
/_serverFn/*itself (reverse proxy, bot challenge, captive portal), the response carries nox-tss-*header at all. If that response was 2xx and non-JSON,getResponsereturned theResponseobject as the server function's result — the caller silently received a challenge page where it expected data, and the failure only showed up later (data.map is not a function).An untagged response did not come from the server-functions handler, so it now rejects with its body, which is what the same function already does for the untagged non-2xx case. Deliberate raw responses keep working: the server marks them with
x-tss-rawand they return before this branch.Added
packages/start-client-core/tests/server-fn-fetcher.test.tscovering the untagged 200 interstitial, the untagged error response, and the tagged raw response.✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Tests