Skip to main content

MandaitorExecutionError

@mandaitor/sdk


@mandaitor/sdk / MandaitorExecutionError

Class: MandaitorExecutionError

Defined in: @mandaitor/sdk/dist/executions.d.ts:117

An error from the execution API. Act on code (TOOL_NOT_ENABLED, IDEMPOTENCY_CONFLICT, DIGEST_MISMATCH, …).

Extends​

Constructors​

Constructor​

new MandaitorExecutionError(status, code, message, errors?, executionId?, execution?, retryAfterMs?, requestId?): MandaitorExecutionError

Defined in: @mandaitor/sdk/dist/executions.d.ts:131

Parameters​

status​

number

code​

string

message​

string

errors?​

object[]

For INVALID_REQUEST and INVALID_ARGUMENTS: each problem.

executionId?​

string

For IDEMPOTENCY_IN_PROGRESS: the execution the key names.

execution?​

Execution

For a 409 on an approval: the execution as it is now.

retryAfterMs?​

number

From Retry-After, where the answer carried one.

requestId?​

string

Returns​

MandaitorExecutionError

Overrides​

MandaitorApiError.constructor

Properties​

cause?​

optional cause?: unknown

Defined in: .pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from​

MandaitorApiError.cause


code​

readonly code: string

Defined in: @mandaitor/sdk/dist/errors.d.ts:48

Machine-readable error code from ErrorCodes

Inherited from​

MandaitorApiError.code


errors​

readonly errors: object[]

Defined in: @mandaitor/sdk/dist/executions.d.ts:119

For INVALID_REQUEST and INVALID_ARGUMENTS: each problem.

code​

code: string

message​

message: string

path​

path: string


execution?​

readonly optional execution?: Execution

Defined in: @mandaitor/sdk/dist/executions.d.ts:127

For a 409 on an approval: the execution as it is now.


executionId?​

readonly optional executionId?: string

Defined in: @mandaitor/sdk/dist/executions.d.ts:125

For IDEMPOTENCY_IN_PROGRESS: the execution the key names.


message​

message: string

Defined in: .pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from​

MandaitorApiError.message


name​

readonly name: string

Defined in: @mandaitor/sdk/dist/executions.d.ts:130

Overrides​

MandaitorApiError.name


requestId?​

readonly optional requestId?: string

Defined in: @mandaitor/sdk/dist/errors.d.ts:50

Optional request ID for support debugging

Inherited from​

MandaitorApiError.requestId


retryAfterMs?​

readonly optional retryAfterMs?: number

Defined in: @mandaitor/sdk/dist/executions.d.ts:129

From Retry-After, where the answer carried one.


stack?​

optional stack?: string

Defined in: .pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from​

MandaitorApiError.stack


status​

readonly status: number

Defined in: @mandaitor/sdk/dist/errors.d.ts:46

HTTP status code (e.g. 400, 404, 500)

Inherited from​

MandaitorApiError.status

Accessors​

isClientError​

Get Signature​

get isClientError(): boolean

Defined in: @mandaitor/sdk/dist/errors.d.ts:62

Returns true if this is a client error (4xx)

Returns​

boolean

Inherited from​

MandaitorApiError.isClientError


isRetryable​

Get Signature​

get isRetryable(): boolean

Defined in: @mandaitor/sdk/dist/errors.d.ts:64

Returns true if this is a server error (5xx) — safe to retry

Returns​

boolean

Inherited from​

MandaitorApiError.isRetryable

Methods​

toJSON()​

toJSON(): object

Defined in: @mandaitor/sdk/dist/errors.d.ts:66

Structured JSON representation for logging

Returns​

object

code​

code: string

message​

message: string

name​

name: string

requestId​

requestId: string | undefined

status​

status: number

Inherited from​

MandaitorApiError.toJSON