MCPcopy Create free account
hub / github.com/astercloud/aster / NewErrorResponse

Function NewErrorResponse

pkg/a2a/types.go:263–273  ·  view source on GitHub ↗

NewErrorResponse 创建错误响应

(id any, code int, message string, data any)

Source from the content-addressed store, hash-verified

261
262// NewErrorResponse 创建错误响应
263func NewErrorResponse(id any, code int, message string, data any) *JSONRPCResponse {
264 return &JSONRPCResponse{
265 JSONRPC: "2.0",
266 ID: id,
267 Error: &RPCError{
268 Code: code,
269 Message: message,
270 Data: data,
271 },
272 }
273}

Callers 6

HandleRequestMethod · 0.85
handleMessageSendMethod · 0.85
handleMessageStreamMethod · 0.85
handleTasksGetMethod · 0.85
handleTasksCancelMethod · 0.85
TestJSONRPCErrorFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestJSONRPCErrorFunction · 0.68