Skip to content

True Myth / task / StopRetrying

Class: 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

Constructors

Constructor

new StopRetrying(message?): StopRetrying

Parameters

message?

string

Returns

StopRetrying

Inherited from

Error.constructor

Constructor

new StopRetrying(message?, options?): StopRetrying

Parameters

message?

string

options?

ErrorOptions

Returns

StopRetrying

Inherited from

Error.constructor

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