isTriggerError jsdocs
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@trigger.dev/sdk": patch
|
||||
---
|
||||
|
||||
isTriggerError jsdocs
|
||||
@@ -12,6 +12,12 @@ export class RetryWithTaskError {
|
||||
) {}
|
||||
}
|
||||
|
||||
/** Use this function if you're using a `try/catch` block to catch errors.
|
||||
* It checks if a thrown error is a special internal error that you should ignore.
|
||||
* If this returns `true` then you must rethrow the error: `throw err;`
|
||||
* @param err The error to check
|
||||
* @returns `true` if the error is a Trigger Error, `false` otherwise.
|
||||
*/
|
||||
export function isTriggerError(
|
||||
err: unknown
|
||||
): err is ResumeWithTaskError | RetryWithTaskError {
|
||||
|
||||
Reference in New Issue
Block a user