feat(client)!: improve malformed response errors#317
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Caution Review failedThe pull request is closed. WalkthroughThe changes update error handling logic across multiple modules. Both the RPC and OpenAPI codecs now use the new Changes
Sequence Diagram(s)sequenceDiagram
participant Codec as Codec Module
participant Utils as Utils Module
participant Response as Server Response
Response->>Codec: Send response with error status
Codec->>Utils: Call getMalformedResponseErrorCode(status)
Utils-->>Codec: Return dynamic error code
Codec->>Codec: Throw ORPCError(dynamic error code, response data)
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
🪧 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
getMalformedResponseErrorCodefunction to verify expected outputs for various input status codes.