Skip to content

Router Status Code does not change from 404 to 200. #4663

@leesb971204

Description

@leesb971204

Which project does this relate to?

Router

Describe the bug

I’m not sure if this is the intended behavior, but once the statusCode is set to 404, it doesn’t change back to 200 even when navigating to a valid route afterward.

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-eekdmazt?file=src%2Froutes%2F__root.tsx

Steps to Reproduce the Bug or Issue

  1. Confirm that the status code is 200.
  2. Click on nowhere and check that the status code changes to 404.
  3. Then, click on about or home again.
  4. The status code does not change back to 200.

Expected behavior

When navigating to a valid route, the status code should be 200.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.127.9
  • OS: macOS
  • Browser: Chrome
  • Browser Version: [e.g. 91.1]
  • Bundler: [e.g. vite]
  • Bundler Version: [e.g. 7.0.0]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions