Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Error
    • ApiError

Implements

Index

Constructors

constructor

  • new ApiError(error: string, errcode?: ErrCode, statusCode?: number, additionalContent?: Record<string, unknown>): ApiError

Properties

Readonly additionalContent

additionalContent: Record<string, unknown> = {}

Readonly errcode

errcode: ErrCode = ErrCode.Unknown

Readonly error

error: string

message

message: string

name

name: string

Optional stack

stack?: string

Readonly statusCode

statusCode: number = -1

Static Optional prepareStackTrace

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

Type declaration

Static stackTraceLimit

stackTraceLimit: number

Accessors

jsonBody

  • get jsonBody(): { errcode: string; error: string }

Methods

apply

  • apply(response: Response<any, Record<string, any>>): void

Static captureStackTrace

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

    Parameters

    • targetObject: Object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc