Hi, I am trying to learn oRPC and integrate it with my Hono (Node.js) backend, following this piece of documentation.
The issue I'm running into is that for some reason, the RPCHandler imported from @orpc/server/fetch is unable to send requests properly from Hono to my oRPC procedure.
The Zod validator (expecting a json object) on the side of oRPC will only receive an undefined input and responds with an "Input validation failed" 400 error.
Interestingly, when I went for another approach and set up a server client that consumes the request directly with an app.post() inside Hono, the procedure and Zod validation went through successfully.
Here's the code that aims to reproduce this issue, including the server client method that I've just mentioned (commented out).
Have I misunderstood some basic concepts on how oRPC works? Hopefully someone more experienced or @unnoq can provide some insights that nudge me in the right direction.
Thanks in advance!
Hi, I am trying to learn oRPC and integrate it with my Hono (Node.js) backend, following this piece of documentation.
The issue I'm running into is that for some reason, the RPCHandler imported from @orpc/server/fetch is unable to send requests properly from Hono to my oRPC procedure.
The Zod validator (expecting a json object) on the side of oRPC will only receive an undefined input and responds with an "Input validation failed" 400 error.
Interestingly, when I went for another approach and set up a server client that consumes the request directly with an app.post() inside Hono, the procedure and Zod validation went through successfully.
Here's the code that aims to reproduce this issue, including the server client method that I've just mentioned (commented out).
Have I misunderstood some basic concepts on how oRPC works? Hopefully someone more experienced or @unnoq can provide some insights that nudge me in the right direction.
Thanks in advance!