triggerdotdev / trigger.dev

Trigger.dev is the open source background jobs platform for TypeScript.

Home Page:https://trigger.dev/changelog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[TRI-2377] bug: `useEventDetails` React hook throws an error when the event is not found

ericallam opened this issue · comments

Provide environment information

Latest packages (2.3.18)

Describe the bug

When passed an event ID that is not found, the fetch for the event details returns a 404, which zodfetch swallows and returns undefined, leading Tanstack Query to throw an error and repeatedly try and refetch the 404 URL.

CleanShot 2024-04-23 at 16 43 54@2x

Reproduction repo

n/a

To reproduce

Pass an eventID that does not exist to useEventDetails

Additional information

No response

From SyncLinear.com | TRI-2377