Samuel BarnholdtS
tRPC2y 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
Was this page helpful?