Skip to main content

ErrorHandlingStrategy

Upgather SDK


Upgather SDK / ErrorHandlingStrategy

Interface: ErrorHandlingStrategy

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

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.