yera.tools.mcp.exceptions

Exceptions raised by MCP-backed Yera tools.

Symbols

class MCPAuthenticationError — Base exception for MCP authentication failures.
class MCPAuthenticationRequiredError — Raised when an MCP resource requires authentication.
class MCPError — Base exception for MCP tool integration failures.
class MCPOAuthCallbackError — Raised when an OAuth callback reports failure.
class MCPOAuthCallbackTimeoutError — Raised when OAuth authorization does not return before its deadline.
class MCPOAuthCallbackUnavailableError — Raised when Yera cannot bind the configured OAuth callback endpoint.
class MCPOAuthCancelledError — Raised when the user cancels OAuth authorization.
class MCPOAuthDeviceDeniedError — Raised when the user denies device authorization.
class MCPOAuthDeviceError — Raised when device authorization reports a terminal OAuth error.
class MCPOAuthDeviceExpiredError — Raised when device authorization expires before approval.
class MCPServerUnreachableError — Raised when an MCP server cannot be reached.
class MCPTaskCancelledError — Raised when an MCP task reaches the cancelled state.
class MCPTaskError — Base exception for MCP task lifecycle failures.
class MCPTaskExecutionRequiredError — Raised when an MCP tool requires unsupported task execution.
class MCPTaskExpiredError — Raised when an MCP task has expired or is no longer available.
class MCPTaskFailedError — Raised when an MCP task reaches the failed state.
class MCPTaskInputRequiredError — Raised when an MCP task requires unsupported client input.
class MCPToolCallError — Raised when an MCP server reports that a tool call failed.

MCPAuthenticationRequiredError

Raised when an MCP resource requires authentication.

Attributes

server_url

MCP resource that rejected the request.

challenge

Complete WWW-Authenticate challenge, when supplied.

Methods

__init__ — Describe an authentication challenge from an MCP resource.

MCPAuthenticationRequiredError.__init__

__init__(
    server_url: str,
    challenge: str | None,
) → None

Describe an authentication challenge from an MCP resource.

Parameters

server_url
type: str

MCP resource that rejected the request.

challenge
type: str | None

Complete WWW-Authenticate response value.

MCPError

Inherits: YeraError

Base exception for MCP tool integration failures.

MCPOAuthCallbackError

Raised when an OAuth callback reports failure.

Attributes

error

OAuth error code returned by the authorization server.

description

Optional human-readable provider detail.

Methods

__init__ — Describe an error returned by an OAuth callback.

MCPOAuthCallbackError.__init__

__init__(
    error: str,
    description: str | None = None,
) → None

Describe an error returned by an OAuth callback.

Parameters

error
type: str

OAuth protocol error code.

description
type: str | None = None

Optional provider-supplied explanation.

MCPOAuthCallbackTimeoutError

Raised when OAuth authorization does not return before its deadline.

MCPOAuthCallbackUnavailableError

Raised when Yera cannot bind the configured OAuth callback endpoint.

MCPOAuthCancelledError

Raised when the user cancels OAuth authorization.

MCPOAuthDeviceDeniedError

Raised when the user denies device authorization.

MCPOAuthDeviceError

Raised when device authorization reports a terminal OAuth error.

Attributes

error

OAuth error code returned by the authorization server.

description

Optional human-readable provider detail.

Methods

__init__ — Describe a terminal device-authorization error.

MCPOAuthDeviceError.__init__

__init__(
    error: str,
    description: str | None = None,
) → None

Describe a terminal device-authorization error.

Parameters

error
type: str

OAuth protocol error code.

description
type: str | None = None

Optional provider-supplied explanation.

MCPOAuthDeviceExpiredError

Raised when device authorization expires before approval.

MCPServerUnreachableError

Inherits: MCPError

Raised when an MCP server cannot be reached.

Attributes

server_url

MCP endpoint that could not be reached.

Methods

__init__ — Describe the unreachable MCP endpoint.

MCPServerUnreachableError.__init__

__init__(
    server_url: str,
) → None

Describe the unreachable MCP endpoint.

Parameters

server_url
type: str

MCP endpoint that could not be reached.

MCPTaskCancelledError

Inherits: MCPTaskError

Raised when an MCP task reaches the cancelled state.

MCPTaskError

Inherits: MCPError

Base exception for MCP task lifecycle failures.

MCPTaskExecutionRequiredError

Inherits: MCPError

Raised when an MCP tool requires unsupported task execution.

MCPTaskExpiredError

Inherits: MCPTaskError

Raised when an MCP task has expired or is no longer available.

MCPTaskFailedError

Inherits: MCPTaskError

Raised when an MCP task reaches the failed state.

MCPTaskInputRequiredError

Inherits: MCPTaskError

Raised when an MCP task requires unsupported client input.

MCPToolCallError

Inherits: MCPError

Raised when an MCP server reports that a tool call failed.