tooluniverse.exceptions moduleΒΆ

ToolUniverse Exception Classes

Structured exceptions for tool execution errors with actionable recovery guidance.

exception tooluniverse.exceptions.ToolError[source]ΒΆ

Bases: Exception

Base exception for all tool-related errors.

error_typeΒΆ

Type of error for classification

Type:

str

retriableΒΆ

Whether the operation can be retried

Type:

bool

next_stepsΒΆ

Actionable steps to resolve the error

Type:

list

detailsΒΆ

Additional context about the error

Type:

dict

__init__(message, error_type=None, retriable=False, next_steps=None, details=None)[source]ΒΆ
to_dict()[source]ΒΆ

Convert exception to structured dictionary format.

exception tooluniverse.exceptions.ToolAuthError[source]ΒΆ

Bases: ToolError

Authentication or authorization error (missing/invalid API key, permissions).

__init__(message, retriable=False, next_steps=None, details=None)[source]ΒΆ
exception tooluniverse.exceptions.ToolUnavailableError[source]ΒΆ

Bases: ToolError

Tool or service is unavailable (network issues, service down, tool not found).

__init__(message, retriable=True, next_steps=None, details=None)[source]ΒΆ
exception tooluniverse.exceptions.ToolRateLimitError[source]ΒΆ

Bases: ToolError

Rate limit or quota exceeded.

__init__(message, retriable=True, next_steps=None, details=None)[source]ΒΆ
exception tooluniverse.exceptions.ToolValidationError[source]ΒΆ

Bases: ToolError

Parameter validation failed (invalid parameters, schema mismatch).

__init__(message, retriable=False, next_steps=None, details=None)[source]ΒΆ
exception tooluniverse.exceptions.ToolConfigError[source]ΒΆ

Bases: ToolError

Tool configuration error (missing config, invalid setup).

__init__(message, retriable=False, next_steps=None, details=None)[source]ΒΆ
exception tooluniverse.exceptions.ToolDependencyError[source]ΒΆ

Bases: ToolError

Missing or incompatible dependencies.

__init__(message, retriable=False, next_steps=None, details=None)[source]ΒΆ
exception tooluniverse.exceptions.ToolServerError[source]ΒΆ

Bases: ToolError

Server-side error (5xx responses, unexpected failures).

__init__(message, retriable=True, next_steps=None, details=None)[source]ΒΆ