MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / interceptFetch

Function interceptFetch

packages/trigger-sdk/src/v3/retry.ts:550–563  ·  view source on GitHub ↗
(...handlers: Array<HttpHandler>)

Source from the content-addressed store, hash-verified

548};
549
550const interceptFetch = (...handlers: Array<HttpHandler>) => {
551 return {
552 run: async <T>(fn: (...args: any[]) => Promise<T>): Promise<T> => {
553 const current = fetchHttpHandlerStorage.getStore();
554
555 if (current) {
556 current.push(...handlers);
557 return fn();
558 } else {
559 return fetchHttpHandlerStorage.run(handlers, fn);
560 }
561 },
562 };
563};
564
565// This function will resolve the defaults of a property within an options object.
566// If the options object is undefined, it will return the defaults for that property (passed in as the 3rd arg).

Callers

nothing calls this directly

Calls 2

runMethod · 0.80
getStoreMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…