Server Routes don't show response data when status code is 404
This is an example of a simple code of server routes. I expected it to return data in JSON with the data as shown above but it only shows this in page:
If I change the status code to anything else then it shows proper response:

7 Replies
extended-salmonOP•2w ago
Versions:
vicious-gold•2w ago
full reproducer project please
extended-salmonOP•2w ago
Sorry for being late but here is it: https://github.com/binamralamsal/tanstack-start-404-api-test
Also, I found out that this bug only occurs in development. It works fine when running after build.
GitHub
GitHub - binamralamsal/tanstack-start-404-api-test
Contribute to binamralamsal/tanstack-start-404-api-test development by creating an account on GitHub.
vicious-gold•2w ago
probably this here
vicious-gold•2w ago
GitHub
notFoundComponent defined in __root not rendered when using nitro@3...
Which project does this relate to? Start Describe the bug The notFoundComponent defined in src/routes/__root.tsx is not rendered when using nitro@3.0.1-alpha.1, but it does work if we're not us...
vicious-gold•2w ago
please verify with latest nitro
extended-salmonOP•2w ago
I tested with
nitro-nightly@3.0.1-20251118-175529-0316c6c6 and the issue has been fixed. Thank you so much for your help.