router
router copied to clipboard
Start: server functions can't serialize error objects
Which project does this relate to?
Start
Describe the bug
https://discord.com/channels/719702312431386674/1238170697650405547/1295132419812233226
Your Example Website or App
https://github.com/nekochan0122/start-todolist-server-fn
Steps to Reproduce the Bug or Issue
- copy
.env.exampleto.env pnpm db:pushpnpm db:generatepnpm dev- try to create same todo and see the error in console
Expected behavior
Error objects should be able to serialize.
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Chrome
- Start Version: 1.65.0
Additional context
No response
if an Error is thrown, it can't be serialized using JSON.stringify
this is what happens currently: https://github.com/TanStack/router/blob/ed07f048a8597858a2bff8b4a558bd68760edb15/packages/start/src/client-runtime/fetcher.tsx#L138-L147
- Pretty sure this is fixed now.