Documentation
¶
Overview ¶
Package errors classifies mcpbench error categories so the aggregator can keep a per-category count without scattering type switches throughout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJSONRPCError ¶
NewJSONRPCError wraps a JSON-RPC code+message as a JSONRPCError.
Types ¶
type Category ¶
type Category string
Category identifies the kind of failure observed for a single request.
const ( CategoryOK Category = "ok" CategoryTimeout Category = "timeout" CategoryJSONRPC Category = "jsonrpc" CategoryTransport Category = "transport" CategoryTemplate Category = "template" CategoryOther Category = "other" )
Stable set of error categories.
func AllCategories ¶
func AllCategories() []Category
AllCategories returns all error-bearing categories (excluding ok).
type JSONRPCError ¶
JSONRPCError is the minimal interface the classifier needs from a JSON-RPC error value. Defined here to avoid an import cycle with internal/jsonrpc.
type TemplateError ¶
type TemplateError struct{ Inner error }
TemplateError indicates rendering the tool-args template failed.
func (*TemplateError) Error ¶
func (e *TemplateError) Error() string
func (*TemplateError) Unwrap ¶
func (e *TemplateError) Unwrap() error
Unwrap allows errors.Is / errors.As.
type TimeoutError ¶
type TimeoutError struct{ Inner error }
TimeoutError indicates the request was cancelled due to timeout.
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
func (*TimeoutError) Unwrap ¶
func (e *TimeoutError) Unwrap() error
Unwrap allows errors.Is / errors.As.
type TransportError ¶
type TransportError struct{ Inner error }
TransportError indicates a failure at the transport layer (subprocess died, connection refused, malformed JSON frame, etc.).
func (*TransportError) Error ¶
func (e *TransportError) Error() string
func (*TransportError) Unwrap ¶
func (e *TransportError) Unwrap() error
Unwrap allows errors.Is / errors.As.