TRPCClientError: Unexpected token 'A', "An error o"... is not valid JSON
I'm making a
fetch
fetch
API call to an external server inside a tRPC route. It works perfectly on localhost, but never works when deployed on Vercel. The request normally takes ~30s, and it has a large body (~12KB).
Solution
I worked around this by upgrading my API server to process it in under 10s, so this confirms it's a timeout issue.