Class NetworkError

Represents a network error or an error encountered while performing a network request.

Hierarchy (view full)

Constructors

  • Parameters

    • message: string
    • request: Request
    • options: {
          cause?: Error;
          isSafeToRetry?: null | boolean;
      } = {}
      • Optional cause?: Error
      • Optional isSafeToRetry?: null | boolean

    Returns NetworkError

Properties

isSafeToRetry: null | boolean

Indicates whether the request that caused this error can be safely retried.

name: string = "NetworkError"
request: Request

Fetch request object.

prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Methods

  • Returns {
        code: number;
        error: boolean;
        errorMessage: string;
    }

    • code: number
    • error: boolean
    • errorMessage: string
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void