`FST_ERR_REP_ALREADY_SENT` when using `res.send()`
I've setup context as such:
And a procedure like this:
4 Replies
which is returning the following error:
as far as I am aware I can't return the
Buffer
directly as it would be resolved to JSON so I have to use res.send
. Is there a way I can make the function not attempt to send another reply when it's returning?
Using @trpc/server@11.0.0-rc.730+776d07336
, fastify@5.2.1
, node v22.11.0
- trpc responses are limited to json at the moment
- if you're using the batch stream link, headers are sent before reaching the mutation
you shouldn't access
res.send()
inside of a procedureSolution
this looks like it should be an api endpoint outside of trpc
Oh, that's a bummer 😦 Alright thank you very much