Skip to main content

Class ApiError

Less than 1 minute

Class ApiError

Declared in packages/core/protocols/dist/esm/src/errors/base-errors.d.ts:14

User facing API Errors. E.g., something was misconfigured.

Constructors

constructor(code, [message], [context])

Returns: ApiError

Arguments:

code: string

message: string

context: Record<string, any>

Properties

cause

Type: unknown

code

Type: string

context

Type: Record<string, any>

message

Type: string

name

Type: string

stack

Type: string

prepareStackTrace

Type: function

Optional override for formatting stack traces

stackTraceLimit

Type: number

Methods

captureStackTrace(targetObject, [constructorOpt])

Create .stack property on a target object

Returns: void

Arguments:

targetObject: object

constructorOpt: Function