t
tRPC
S
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
?
Solution
I solved it through returning the error locally instead of throwing it
Jump to solution
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
TRPCClientError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON Error
A
azlath / ❓-help
3y ago
Suddenly started getting a `TRPCClientError: Unexpected token '<', "<!DOCTYPE...` error
Y
yinks / ❓-help
2y ago
Unexpected token
S
shikishikichangchang / ❓-help
2y ago
Unexpected token
L
lambo / ❓-help
4y ago