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-2048] Better handle `fetch` throwing errors in our ApiClient

ericallam opened this issue · comments

As you can see in the code below, we aren't handling any thrown errors by fetch:

async function zodfetch<TResponseSchema extends z.ZodTypeAny, TOptional extends boolean = false>(

This can lead to issues when the fetch times out and throws an error. We should fix this and also investigate which other errors can be thrown and handle those with retries (if it makes sense).

TRI-2048