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

Function isTriggerError

packages/trigger-sdk/src/errors.ts:72–83  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

70 * @returns `true` if the error is a Trigger Error, `false` otherwise.
71 */
72export function isTriggerError(err: unknown): err is TriggerInternalError {
73 return (
74 err instanceof ResumeWithTaskError ||
75 err instanceof RetryWithTaskError ||
76 err instanceof CanceledWithTaskError ||
77 err instanceof YieldExecutionError ||
78 err instanceof AutoYieldExecutionError ||
79 err instanceof AutoYieldWithCompletedTaskExecutionError ||
80 err instanceof AutoYieldRateLimitError ||
81 err instanceof ResumeWithParallelTaskError
82 );
83}
84
85// This error isn't an internal error but it can be used by the user to figure out which task caused the error
86export class ErrorWithTask extends Error {

Callers 4

parallelMethod · 0.90
executeTaskMethod · 0.90
tryMethod · 0.90
createWebhookEventSourceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…