Skip to main content

ErrorHandlingStrategy

Upgather SDK


Upgather SDK / ErrorHandlingStrategy

Interface: ErrorHandlingStrategy

Defined in: lib/error/ErrorHandlingStrategy.ts:22

Interface for error handling strategies.

Remarks

Implementations of this interface are used to handle errors from API responses and determine subsequent actions like retrying or aborting.

Methods

handleError()

handleError(response, attempt, originalError): ErrorHandlingResult

Defined in: lib/error/ErrorHandlingStrategy.ts:31

Handles an error based on the API response and the current attempt number.

Parameters

response

ApiResponse

The API response containing error details.

attempt

number

The current attempt number.

originalError

Error

The original error that occurred.

Returns

ErrorHandlingResult

An ErrorHandlingResult indicating what action to take.