trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

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

Open ericallam opened this issue 1 year ago • 0 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

ericallam avatar Apr 23 '24 15:04 ericallam