setStatus or setResponseStatus doesn't work in server functions
I'm trying to set status code in server fn but it just ignores it and returns 200
9 Replies
narrow-beige•11mo ago
can you please provide a minimal complete example by forking one of the existing examples?
eastern-cyanOP•11mo ago
Can I provide a github repo?
narrow-beige•11mo ago
of course
eastern-cyanOP•11mo ago
GitHub
GitHub - Danieljs-codes/Start-repro
Contribute to Danieljs-codes/Start-repro development by creating an account on GitHub.
eastern-cyanOP•11mo ago
Check the index.tsx I created on server function in /utils/action and I am calling it on the home page
See everything works but it returns it with a 200 status code
It doesn't work on stackblitz cause I think vinxi can't access the AsyncLocalStorage
narrow-beige•11mo ago
I fixed this in https://github.com/TanStack/router/releases/tag/v1.69.2
GitHub
Release v1.69.2 · TanStack/router
Version 1.69.2 - 10/15/24, 10:31 PM
Changes
Fix
start: correctly handle custom response status codes (#2553) (77fe390) by Manuel Schiller
Test
Add test cases for route id consistency (#2401) (ac...
eastern-cyanOP•11mo ago
Installed this but it seems like it breaks redirect @Manuel Schiller
eastern-cyanOP•11mo ago
It redirects before now it shows this

narrow-beige•11mo ago
sorry, fixed again