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

Method sendError

server/handlers/websocket.go:480–485  ·  view source on GitHub ↗

sendError sends an error message to the WebSocket client

(wsConn *WebSocketConnection, code, message string)

Source from the content-addressed store, hash-verified

478
479// sendError sends an error message to the WebSocket client
480func (h *WebSocketHandler) sendError(wsConn *WebSocketConnection, code, message string) {
481 h.sendMessage(wsConn, "error", map[string]any{
482 "code": code,
483 "message": message,
484 })
485}
486
487// closeConnection closes a WebSocket connection
488func (h *WebSocketHandler) closeConnection(wsConn *WebSocketConnection) {

Callers 8

readPumpMethod · 0.95
handleMessageMethod · 0.95
handleChatMethod · 0.95
handleTodoCreateMethod · 0.95
handleTodoUpdateMethod · 0.95
handleTodoDeleteMethod · 0.95
handleToolControlMethod · 0.95

Calls 1

sendMessageMethod · 0.95

Tested by

no test coverage detected