Skip to content

Throwing notFound() in beforeLoad() already shows the error during preload #1796

Closed

Description

@melv-n

Describe the bug

I don't even need to click the link, as soon as I hover over it, I get the "Not found" error message?

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-xxntjv?file=src%2Froutes%2Fbrowse.%24.tsx

Steps to Reproduce the Bug or Issue

  1. Go to /browse
  2. Hover over "Browse 404"

Expected behavior

No error, just a preloading in the background. Only when I click the link will I see the not found error.

Actual behavior

The 404 error is shown as soon as I hover over the link as a result of preloading that page.

Platform

  • OS: macOS + Arc 1.47

Additional context

No response

Activity

  1. changed the title [-]`throw notFound()` in `beforeLoad()` when preloading instantly shows the error[/-] [+]Throwing `notFound()` in `beforeLoad()` incorrectly shows error when preloading[/+] on Jun 21, 2024
  2. changed the title [-]Throwing `notFound()` in `beforeLoad()` incorrectly shows error when preloading[/-] [+]Throwing `notFound()` in `beforeLoad()` incorrectly shows the error when preloading[/+] on Jun 21, 2024
  3. changed the title [-]Throwing `notFound()` in `beforeLoad()` incorrectly shows the error when preloading[/-] [+]Throwing `notFound()` in `beforeLoad()` already shows the error during preload[/+] on Jun 21, 2024
  4. schiller-manuel commented on Jul 6, 2024

    @schiller-manuel
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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