Class: ExecutionError | AppKit

Error thrown when an operation execution fails. Use for statement failures, canceled operations, or unexpected states.

Example

throw new ExecutionError("Statement failed: syntax error");
throw new ExecutionError("Statement was canceled");

Extends

Constructors

Constructor

new ExecutionError(message: string, options?: {
cause?: Error;
context?: Record<string, unknown>;
}): ExecutionError;

Parameters

ParameterType
messagestring
options?{ cause?: Error; context?: Record<string, unknown>; }
options.cause?Error
options.context?Record<string, unknown>

Returns

ExecutionError

Inherited from

AppKitError.constructor

Properties

cause?

readonly optional cause: Error;

Optional cause of the error

Inherited from

AppKitError.cause


code

readonly code: "EXECUTION_ERROR" = "EXECUTION_ERROR";

Error code for programmatic error handling

Overrides

AppKitError.code


context?

readonly optional context: Record<string, unknown>;

Additional context for the error

Inherited from

AppKitError.context


isRetryable

readonly isRetryable: false = false;

Whether this error type is generally safe to retry

Overrides

AppKitError.isRetryable


statusCode

readonly statusCode: 500 = 500;

HTTP status code suggestion (can be overridden)

Overrides

AppKitError.statusCode

Methods

toJSON()

toJSON(): Record<string, unknown>;

Convert error to JSON for logging/serialization. Sensitive values in context are automatically redacted.

Returns

Record<string, unknown>

Inherited from

AppKitError.toJSON


toString()

Create a human-readable string representation

Returns

string

Inherited from

AppKitError.toString


canceled()

static canceled(): ExecutionError;

Create an execution error for canceled operation

Returns

ExecutionError


missingData()

static missingData(dataType: string): ExecutionError;

Create an execution error for missing data

Parameters

ParameterType
dataTypestring

Returns

ExecutionError


resultsClosed()

static resultsClosed(): ExecutionError;

Create an execution error for closed/expired results

Returns

ExecutionError


statementFailed()

static statementFailed(errorMessage?: string): ExecutionError;

Create an execution error for statement failure

Parameters

ParameterType
errorMessage?string

Returns

ExecutionError


unknownState()

static unknownState(state: string): ExecutionError;

Create an execution error for unknown state

Parameters

ParameterType
statestring

Returns

ExecutionError