tRPCttRPC
Powered by
Samuel BarnholdtS
tRPC•2y ago•
13 replies
Samuel Barnholdt

Throwing something other than `Unexpected token '<', "<!DOCTYPE "... is not valid JSON`

I'm trying to do custom error handling but whatever I throw just ends up being `Unexpected token '<', "<!DOCTYPE "... is not valid JSON``

Am I doing something weird here?
Screenshot_2024-04-08_at_15.44.26.png
Solution
I solved it through returning the error locally instead of throwing it
Screenshot_2024-04-08_at_16.23.39.png
Jump to solution
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

TRPCClientError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON Error
azlathAazlath / ❓-help
3y ago
Suddenly started getting a `TRPCClientError: Unexpected token '<', "<!DOCTYPE...` error
yinksYyinks / ❓-help
2y ago
Unexpected token
shikishikichangchangSshikishikichangchang / ❓-help
2y ago
Unexpected token
lamboLlambo / ❓-help
4y ago