Skip to content

A rejected promise in <Await> in a notFoundComponent is not caught by the defaultErrorComponent #2256

@lo1tuma

Description

@lo1tuma

Which project does this relate to?

Router

Describe the bug

I‘m using <Await> to fetch some data in a notFoundComponent. When using renderToPipeableStream() I can see the following object has been thrown and not caught by an error boundary:

{
  data: { data: { data: [Object], __isServerError: true } },
  __isServerError: true
}

Your Example Website or App

https://stackblitz.com/edit/github-yk78pg-wpq5bb

Steps to Reproduce the Bug or Issue

  • checkout the example
  • run npm i
  • run npm run compile
  • run node dist/main.js

Expected behavior

I would expect:

  1. the defaultErrorComponent being invoked with the rejected promise from <Await />
  2. to get an actual instance of Error instead of the serialized server error object

Screenshots or Videos

No response

Platform

  • Version: 1.52.4

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstartEverything about TanStack Start

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions