Skip to content

ToolExecutionError

A tool’s execute() function threw an error. Wrapped with the tool name for context.

new ToolExecutionError(toolName, cause): ToolExecutionError

string

Error

ToolExecutionError

AgentExpressError.constructor

readonly optional cause?: Error

Original error that caused this one, if any.

AgentExpressError.cause


code: string

Machine-readable error code (e.g., “ABORT”, “RATE_LIMIT”, “TOOL_DENIED”).

AgentExpressError.code


readonly retryable: boolean

Whether this error can be retried by retry middleware.

AgentExpressError.retryable


readonly toolName: string

Name of the tool that failed.