ErrorWithCode class

Error class with code and message thrown by the SDK.

Extends

Error

Constructors

ErrorWithCode(string, ErrorCode)

Constructor of ErrorWithCode.

Properties

code

Error code

Inherited Properties

Inherited Methods

captureStackTrace(object, Function)

Create .stack property on a target object

Constructor Details

ErrorWithCode(string, ErrorCode)

Constructor of ErrorWithCode.

TypeScript
new ErrorWithCode(message?: string, code?: ErrorCode)

Parameters

message

string

error message.

code
ErrorCode

error code.

Property Details

code

Error code

TypeScript
code: undefined | string

Property Value

undefined | string

Inherited Property Details

message

TypeScript
message: string

Property Value

string

Inherited From Error.message

name

TypeScript
name: string

Property Value

string

Inherited From Error.name

prepareStackTrace

Optional override for formatting stack traces

See https://v8.dev/docs/stack-trace-api#customizing-stack-traces

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

Property Value

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

Inherited From Error.prepareStackTrace

stack

TypeScript
stack?: string

Property Value

string

Inherited From Error.stack

stackTraceLimit

TypeScript
static stackTraceLimit: number

Property Value

number

Inherited From Error.stackTraceLimit

Inherited Method Details

captureStackTrace(object, Function)

Create .stack property on a target object

TypeScript
static function captureStackTrace(targetObject: object, constructorOpt?: Function)

Parameters

targetObject

object

constructorOpt

Function

Inherited From Error.captureStackTrace