MCPcopy
hub / github.com/googleapis/mcp-toolbox / Error

Struct Error

internal/server/mcp/jsonrpc/jsonrpc.go:101–110  ·  view source on GitHub ↗

Error represents the error content.

Source from the content-addressed store, hash-verified

99
100// Error represents the error content.
101type Error struct {
102 // The error type that occurred.
103 Code int `json:"code"`
104 // A short description of the error. The message SHOULD be limited
105 // to a concise single sentence.
106 Message string `json:"message"`
107 // Additional information about the error. The value of this member
108 // is defined by the sender (e.g. detailed error information, nested errors etc.).
109 Data interface{} `json:"data,omitempty"`
110}
111
112// String returns the error type as a string based on the error code.
113func (e Error) String() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected