feat(server): error on unsupported batch response types#355
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request introduces enhancements to the error handling of the batch processing system. A new test case in the batch handler’s test suite verifies that unsupported response types (such as Blob and FormData) return a 500 status code along with an appropriate error message. Additionally, the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant T as Test Suite
participant B as BatchHandlerPlugin
T->>B: Send batch request with various body types (Blob, FormData, string)
B->>B: Check if response.body is Blob, FormData, or async iterator
alt Unsupported type detected
B->>T: Return 500 status with error message
else Supported type
B->>T: Process and return 200 status with response
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Graph Analysis (2)packages/server/src/plugins/batch.ts (1)
packages/server/src/plugins/batch.test.ts (2)
🔇 Additional comments (3)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
More templates
@orpc/arktype
@orpc/client
@orpc/openapi
@orpc/openapi-client
@orpc/contract
@orpc/react
@orpc/react-query
@orpc/server
@orpc/shared
@orpc/solid-query
@orpc/standard-server
@orpc/standard-server-fetch
@orpc/standard-server-node
@orpc/svelte-query
@orpc/valibot
@orpc/vue-colada
@orpc/vue-query
@orpc/zod
commit: |
Summary by CodeRabbit
Bug Fixes
Tests