MCPcopy Create free account
hub / github.com/github/gh-aw / newMCPError

Function newMCPError

pkg/cli/mcp_error.go:11–13  ·  view source on GitHub ↗

newMCPError creates a jsonrpc.Error with the given code, message, and optional data. The data value is marshaled via mcpErrorData.

(code int64, msg string, data any)

Source from the content-addressed store, hash-verified

9// newMCPError creates a jsonrpc.Error with the given code, message, and optional data.
10// The data value is marshaled via mcpErrorData.
11func newMCPError(code int64, msg string, data any) error {
12 return &jsonrpc.Error{Code: code, Message: msg, Data: mcpErrorData(data)}
13}
14
15// mcpErrorData marshals data to JSON for use in jsonrpc.Error.Data field.
16// Returns nil if marshaling fails to avoid errors in error handling.

Callers 12

checkActorPermissionFunction · 0.85
registerStatusToolFunction · 0.85
registerCompileToolFunction · 0.85
registerMCPInspectToolFunction · 0.85
registerChecksToolFunction · 0.85
registerLogsToolFunction · 0.85
registerAuditToolFunction · 0.85
registerAuditDiffToolFunction · 0.85
registerAddToolFunction · 0.85
registerUpdateToolFunction · 0.85
registerFixToolFunction · 0.85

Calls 1

mcpErrorDataFunction · 0.85

Tested by

no test coverage detected