UNPKG

@appsemble/lang-sdk

Version:

Language SDK for Appsemble

39 lines (38 loc) 933 B
import { type ActionDefinition } from './actionDefinition.js'; export interface ActionErrorOptions<D extends ActionDefinition> { /** * What caused the error to be thrown. */ cause: unknown; /** * The action input data. */ data: unknown; /** * The definition of the action that threw the error. */ definition: D; /** * The HTTP status code of the error, if there is one. */ status?: number; } /** * This error may be thrown by actions. */ export declare class ActionError<D extends ActionDefinition = ActionDefinition> extends Error { cause: unknown; /** * The action input data. */ data: unknown; /** * The definition of the action that threw the error. */ definition: D; /** * The HTTP status code of the error, if there is one. */ status?: number; constructor(options: ActionErrorOptions<D>); }