Dev Guide
Dev GuideUser GuidesLegal TermsGitHubDevCommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

ODP Node SDK / ODP / ApiV3 / HttpError

HttpError

Hierarchy

  • Error.HttpError

Index

Constructors

Properties

Methods

Constructors

constructor()

Signature

new HttpError(message: string, code?: string, response?: HttpResponse<V3ErrorResponse>): HttpError;

Parameters

NameType
messagestring
code?string
response?HttpResponse<V3ErrorResponse>

Returns

HttpError

Overrides: Error.constructor

Defined in: src/Api/lib/ApiV3.ts:76

Properties

code?

string

Defined in: src/Api/lib/ApiV3.ts:78

message

string

Inherited from: Error.message

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1041

name

string

Inherited from: Error.name

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1040

response?

HttpResponse<V3ErrorResponse>

Defined in: src/Api/lib/ApiV3.ts:79

stack?

string

Inherited from: Error.stack

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1042

prepareStackTrace?

Function

Type declaration

Optional override for formatting stack traces

See

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

Signature
(err: Error, stackTraces: CallSite[]): any;
Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

Inherited from: Error.prepareStackTrace

Defined in: node_modules/@types/node/globals.d.ts:11

stackTraceLimit

Static number

Inherited from: Error.stackTraceLimit

Defined in: node_modules/@types/node/globals.d.ts:13

Methods

captureStackTrace()

Create .stack property on a target object

Signature

Static captureStackTrace(targetObject: object, constructorOpt?: Function): void;

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from: Error.captureStackTrace

Defined in: node_modules/@types/node/globals.d.ts:4