Skip to content

Capture server-side errors #18283

@nicohrubec

Description

@nicohrubec

Server-side errors thrown in server routes are not captured.

Solution Brainstorm: To instrument this we can use the Server Entry Point, responsible for handling all SSR-related work as well as for handling server routes and server function requests. Tanstack users can define custom server entry points using createServerEntry (available from Tanstack Start v1.136.0), which receives a requestHandler. We can either wrap the requestHandler or createServerEntry directly. We should also take care of only reporting unexpected errors (5xx).

Tests:

  • Add test that verifies that server router errors are being captured.
  • Add test that expected errors are not reported.

Documentation: Need to update public and onboarding docs when this works.

Draft PR

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions