Skip to content

True Myth / task / StopRetrying

Interface: StopRetrying ​

A custom Error subclass which acts as a “sentinel”: when you return it either as the top-level return value from the callback for withRetries or the rejection reason for a Task produces by withRetries, the function will stop retrying immediately.

You can neither construct this class directly nor subclass it. Instead, use the stopRetrying helper function to construct it.

Extends ​

  • Error

Properties ​

cause? ​

optional cause?: unknown

Inherited from ​

Error.cause


message ​

message: string

Inherited from ​

Error.message


stack? ​

optional stack?: string

Inherited from ​

Error.stack

Accessors ​

name ​

Get Signature ​

get name(): string

Returns ​

string

Overrides ​

Error.name