Options
All
  • Public
  • Public/Protected
  • All
Menu

IdealPostcodesError

Base error class for all API responses that return an error. This class is used where a JSON body is not provided or invalid E.g. 503 rate limit response, JSON parse failure response

Hierarchy

Index

Constructors

constructor

  • Instantiate IdealPostcodesError

    Parameters

    • options: IdealPostcodesErrorOptions

    Returns IdealPostcodesError

Properties

__proto__

__proto__: Error

httpStatus

httpStatus: number

message

message: string

metadata

metadata: Metadata

name

name: string

Optional stack

stack: string

Static Optional prepareStackTrace

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

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Optional override for formatting stack traces

      Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

Static stackTraceLimit

stackTraceLimit: number

Methods

Static captureStackTrace

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

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void