Class NodeHoyoError

Represents an error that can be thrown during interactions with the Hoyolab API.

Hierarchy

  • Error
    • NodeHoyoError

Constructors

  • Constructs a new instance of the HoyolabError class with the specified message.

    Parameters

    • message: string

      The message to associate with this error.

    • Optionalcode: number

      The error code to associate with this error.

    • Optionalhttp: IHTTPError

      The HTTP object to associate with this error.

    Returns NodeHoyoError

Properties

cause?: unknown
code?: number

The error code

http?: IHTTPError

The HTTP object

message: string

The message associated with this error.

name: string

The name of this error.

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

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void