tRPC doesn't support redirect
I use tRPC & @trpc/server/adapters/express.
procdure.query({ctx: { res }} => {
res.redirect('xxx')
})
this will stop node process and some errors like:
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client.
But if I just use expressjs,it does not happen.
procdure.query({ctx: { res }} => {
res.redirect('xxx')
})
this will stop node process and some errors like:
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client.
But if I just use expressjs,it does not happen.