Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an error caused by an api call i.e. it has attributes for a HTTP status code and the returned body object.

Example API returns a ErrorMessageObject whenever HTTP status code is not in [200, 299] => ApiException(404, someErrorMessageObject)

Type Parameters

  • T

Hierarchy

  • Error
    • ApiException

Index

Constructors

  • new ApiException<T>(code: number, message: string, body: T, headers: {}): ApiException<T>

Properties

body: T
code: number
headers: {}

Type declaration

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

Type declaration

stackTraceLimit: number

Methods

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc