Skip to content
Source
Sign inSign up
TanStack/router

SSR status code is always 200 even when error throws in loader #5535

Send to my agent
Closedandyabih(GitHub profile, opens in a new tab) opened this issue 0 comments

Which project does this relate to?

Start

Describe the bug

Added a very basic example, but essentially if the loader throws an Error, the response of the SSR is 200 regardless.

Would be great to be able to custom set the code to whatever is appropriate for the error, but a default 500 is still also perfectly fine.

Your Example Website or App

https://stackblitz.com/~/github.com/andyabih/ts-status-code

Steps to Reproduce the Bug or Issue

  1. Go to reproduced repo
  2. Check Devtools and status code

Expected behavior

  1. SSR response status code should be 500

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.132.0
  • OS: macOS
  • Browser: Chrome
  • Browser Version: -
  • Bundler: Vite
  • Bundler Version: 7.1.7

Additional context

No response

Sign in to join this conversation.