From 859f2989be7004b9a01b2743f7659698d563ca79 Mon Sep 17 00:00:00 2001 From: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:04:52 -0800 Subject: [PATCH] ToolExecutionError description (#762) we actually don't want to deprecate ToolExecutionError --- > [!NOTE] > **Low Risk** > Low risk: behavior change is limited to no longer emitting a `DeprecationWarning` when `ToolExecutionError` is instantiated, plus a patch version bump. > > **Overview** > `ToolExecutionError` is no longer treated as deprecated: the `warnings` import and runtime `DeprecationWarning` emission were removed, and the class docstring was updated to describe it as the base exception for errors raised from within a tool body. > > Bumps `arcade-core` version from `4.2.2` to `4.2.3`. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 250d20e393a8a4d8dc20fad673a7faea1cba4797. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- libs/arcade-core/arcade_core/errors.py | 20 +++----------------- libs/arcade-core/pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/libs/arcade-core/arcade_core/errors.py b/libs/arcade-core/arcade_core/errors.py index a9fed151..707bf880 100644 --- a/libs/arcade-core/arcade_core/errors.py +++ b/libs/arcade-core/arcade_core/errors.py @@ -1,5 +1,4 @@ import traceback -import warnings from abc import ABC, abstractmethod from enum import Enum from typing import Any @@ -230,15 +229,10 @@ class ToolOutputError(ToolSerializationError): # 2. ------ tool-body errors ------ class ToolExecutionError(ToolRuntimeError): """ - DEPRECATED: Raised when there is an error executing a tool. + Raised when an error occurs during the execution of a tool's body. - ToolExecutionError is deprecated and will be removed in a future major version. - Use more specific error types instead: - - RetryableToolError for retryable errors - - ContextRequiredToolError for errors requiring user context - - FatalToolError for fatal/unexpected errors - - UpstreamError for upstream service errors - - UpstreamRateLimitError for upstream rate limiting errors + This is the base class for tool execution errors and should be raised when catching + exceptions within a tool to provide meaningful information to the tool caller. """ def __init__( @@ -248,14 +242,6 @@ class ToolExecutionError(ToolRuntimeError): *, extra: dict[str, Any] | None = None, ): - if type(self) is ToolExecutionError: - warnings.warn( - "ToolExecutionError is deprecated and will be removed in a future major version. " - "Use more specific error types instead: RetryableToolError, ContextRequiredToolError, " - "FatalToolError, UpstreamError, or UpstreamRateLimitError.", - DeprecationWarning, - stacklevel=2, - ) super().__init__(message, developer_message=developer_message, extra=extra) diff --git a/libs/arcade-core/pyproject.toml b/libs/arcade-core/pyproject.toml index 867ea6e8..3227bebd 100644 --- a/libs/arcade-core/pyproject.toml +++ b/libs/arcade-core/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arcade-core" -version = "4.2.2" +version = "4.2.3" description = "Arcade Core - Core library for Arcade platform" readme = "README.md" license = { text = "MIT" }