ferdy
ferdy15mo ago

trpc client request size limits?

I am sending a pretty sizable request and am seeing
[TRPCClientError: JSON Parse error: Unexpected token: <]
[TRPCClientError: JSON Parse error: Unexpected token: <]
I am not sure where the unexpected token is coming from or how to further debug this. My trpc client looks like
this.trpcClient = createTRPCProxyClient<TendrelAppRouter>({
links: [
loggerLink(
enabled: _ => true
}),
httpBatchLink({
url: stage.endpoint,
headers: () => ({ bearer: this.workerAuthToken }),
})
],
transformer: superjson
});
}
this.trpcClient = createTRPCProxyClient<TendrelAppRouter>({
links: [
loggerLink(
enabled: _ => true
}),
httpBatchLink({
url: stage.endpoint,
headers: () => ({ bearer: this.workerAuthToken }),
})
],
transformer: superjson
});
}
1 Reply
ferdy
ferdy15mo ago
the request never makes it to the server, so somewhere the trpc client is trying to parse the request for some reason and i think having it too big makes it introduce a funky token?