McpError

sealed interface McpError

Sealed type encapsulating the known failure modes of MCP clients

Inheritors

Types

Link copied to clipboard
data class Http(val response: Response) : McpError

HTTP error, most commonly thrown during sending of a request

Link copied to clipboard
data class Internal(val cause: Exception) : McpError

Unexpected error

Link copied to clipboard
data class Protocol(val error: ErrorMessage) : McpError

Standard error returned within the MCP protocol

Link copied to clipboard
data object Timeout : McpError

It's a timeout when waiting for a response to complete