(err: unknown)
| 70 | * @returns `true` if the error is a Trigger Error, `false` otherwise. |
| 71 | */ |
| 72 | export 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 |
| 86 | export class ErrorWithTask extends Error { |
no outgoing calls
no test coverage detected
searching dependent graphs…