Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApiError

This error is thrown after a failed API request and contains additional information about the failed request.

Hierarchy

Index

Constructors

constructor

  • new ApiError(message: string, responseMetadata?: IncomingMessage, responseText?: undefined | string): ApiError
  • Initializes a new instance of the ApiError class.

    Parameters

    • message: string

      The message associated with the error.

    • Optional responseMetadata: IncomingMessage

      The HTTP response metadata returned by the NationStates website.

    • Optional responseText: undefined | string

      The HTTP response text returned by the API.

    Returns ApiError

Properties

message

message: string

The message associated with the error.

name

name: string

Optional responseMetadata

responseMetadata: IncomingMessage

The HTTP response metadata returned by the NationStates website.

Optional responseText

responseText: undefined | string

The HTTP response text returned by the API.

Optional stack

stack: undefined | string

Static Error

Error: ErrorConstructor

Generated using TypeDoc