Error Handling

The best way to manage some errors.

Overview

With these methods, we check axios, wallet and other errors in the Trustless Work requests.

Enums

Types of errors.

/**
 * Types for Error types
 */
export enum ApiErrorTypes {
  NOT_FOUND = "NOT_FOUND",
  UNAUTHORIZED = "UNAUTHORIZED",
  UNKNOWN_ERROR = "UNKNOWN_ERROR",
  WALLET_ERROR = "WALLET_ERROR",
}

Handle Errors

Throw the errors in the expected way.

Last updated

Was this helpful?