Skip to content

Commit

Permalink
Ensure NonRetryableError is exported in cloudflare:workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthachatterjee committed Sep 12, 2024
1 parent a05f580 commit e5432c9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions types/defines/workflows.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
* NonRetryableError allows for a user to throw a fatal error
* that makes a Workflow instance fail immediately without triggering a retry
*/
declare abstract class NonRetryableError extends Error {
/**
* `__brand` is used to differentiate between `NonRetryableError` and `Error`
* and is omitted from the constructor because users should not set it
*/
public constructor(message: string, name?: string);
declare module "cloudflare:workflows" {
export abstract class NonRetryableError extends Error {
/**
* `__brand` is used to differentiate between `NonRetryableError` and `Error`
* and is omitted from the constructor because users should not set it
*/
public constructor(message: string, name?: string);
}
}

declare abstract class Workflow {
Expand Down

0 comments on commit e5432c9

Please sign in to comment.