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

Function isReplicateApiError

integrations/replicate/src/index.ts:223–235  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

221}
222
223function isReplicateApiError(error: unknown): error is ApiError {
224 if (typeof error !== "object" || error === null) {
225 return false;
226 }
227
228 const apiError = error as ApiError;
229
230 return (
231 apiError.name === "ApiError" &&
232 apiError.request instanceof Request &&
233 apiError.response instanceof Response
234 );
235}
236
237function shouldRetry(method: string, status: number) {
238 return status === 429 || (method === "GET" && status >= 500);

Callers 1

onErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…