Skip to content

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

@andyabih

Description

@andyabih

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions