Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/mcp / errors

errors

Typed error union for the @graphorin/mcp package.

Every error carries a stable lowercase MCPErrorKind discriminator, an actionable MCPError.hint field where applicable, and an optional structured metadata bag the audit emitter persists alongside the standard runId / sessionId context.

Classes

ClassDescription
GraphorinMCPErrorBase class for every typed error produced by @graphorin/mcp.
MCPAuthErrorRaised when an authentication / authorization step fails.
MCPCallTimeoutErrorRaised when a tool call exceeds its configured timeout / aborts.
MCPCancelledErrorRaised when an in-flight call is cancelled by an AbortSignal.
MCPConnectionErrorRaised when a transport fails to connect or is dropped unexpectedly.
MCPInvalidConfigErrorRaised on invalid createMCPClient(...) configuration.
MCPProtocolErrorRaised on JSON-RPC / MCP protocol-level errors.
MCPToolNotFoundErrorRaised when MCPClient.callTool is invoked for an unknown tool.
MCPTransportNotSupportedErrorRaised when an operator requests a transport / capability that the runtime does not support (e.g. resumable: true on stdio).

Interfaces

InterfaceDescription
MCPErrorMetadataCommon metadata bag attached to every MCPError.

Type Aliases

Type AliasDescription
MCPErrorKindDiscriminator union for every error class produced by @graphorin/mcp. New kinds extend this union; never throw plain Error from framework code.