ToolExecutionError description (#762)
we actually don't want to deprecate ToolExecutionError <!-- CURSOR_SUMMARY --> --- > [!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`. > > <sup>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).</sup> <!-- /CURSOR_SUMMARY -->
This commit is contained in:
parent
10fd728fcf
commit
859f2989be
2 changed files with 4 additions and 18 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import traceback
|
import traceback
|
||||||
import warnings
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
@ -230,15 +229,10 @@ class ToolOutputError(ToolSerializationError):
|
||||||
# 2. ------ tool-body errors ------
|
# 2. ------ tool-body errors ------
|
||||||
class ToolExecutionError(ToolRuntimeError):
|
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.
|
This is the base class for tool execution errors and should be raised when catching
|
||||||
Use more specific error types instead:
|
exceptions within a tool to provide meaningful information to the tool caller.
|
||||||
- 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
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|
@ -248,14 +242,6 @@ class ToolExecutionError(ToolRuntimeError):
|
||||||
*,
|
*,
|
||||||
extra: dict[str, Any] | None = None,
|
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)
|
super().__init__(message, developer_message=developer_message, extra=extra)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "arcade-core"
|
name = "arcade-core"
|
||||||
version = "4.2.2"
|
version = "4.2.3"
|
||||||
description = "Arcade Core - Core library for Arcade platform"
|
description = "Arcade Core - Core library for Arcade platform"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = { text = "MIT" }
|
license = { text = "MIT" }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue