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

[TRI-2048] Better handle `fetch` throwing errors in our ApiClient

Open ericallam opened this issue 1 year ago • 0 comments

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

https://github.com/triggerdotdev/trigger.dev/blob/5d78bba5e3fda2668bbd1d3d67f8ba4c4479c559/packages/trigger-sdk/src/apiClient.ts#L888

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

ericallam avatar Mar 09 '24 21:03 ericallam