Need Help Server Fn Error with Zod
GitHub
GitHub - gglennd/tanstack-start at feat/orm
Contribute to gglennd/tanstack-start development by creating an account on GitHub.
5 Replies
relaxed-coral•2mo ago
what does "properly" mean here ?
fascinating-indigoOP•2mo ago
I'm trying to follow basic error to display error message on client.
I first tried zod schema on inputValidator
but it console logs errors, and display nothing
then I tried safeParse, It did display the error message, still logs the error on both client and server
then this stop logging on server
is this expected behavior? or I'm barking on the wrong tree.
Sorry for my bad English
relaxed-coral•2mo ago
you can add a serialization adapter for zod errors, following this example: https://github.com/TanStack/router/blob/main/e2e/react-start/serialization-adapters/src/CustomError.ts
GitHub
router/e2e/react-start/serialization-adapters/src/CustomError.ts at...
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router
relaxed-coral•2mo ago
does this solve your issue?
fascinating-indigoOP•2mo ago
still figuring things out