Class RequestError

Class representing a request error.

Hierarchy

  • Error
    • RequestError

Constructors

  • Parameters

    • Optionalmessage: string

    Returns RequestError

Properties

message: string
name: string
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Returns a string representation of the RequestError.

    Returns string

    A string describing the error.

    const error = new RequestError('Something went wrong');
    console.log(error.toString()); // "RequestError: Something went wrong"
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void