MCPcopy
hub / github.com/wavetermdev/waveterm / sendControlUnauthenticatedErrorResponse

Function sendControlUnauthenticatedErrorResponse

pkg/wshutil/wshrouter.go:847–858  ·  view source on GitHub ↗
(cmdMsg RpcMessage, linkMeta linkMeta, router *WshRouter)

Source from the content-addressed store, hash-verified

845}
846
847func sendControlUnauthenticatedErrorResponse(cmdMsg RpcMessage, linkMeta linkMeta, router *WshRouter) {
848 if cmdMsg.ReqId == "" {
849 return
850 }
851 rtnMsg := RpcMessage{
852 Source: ControlRoute,
853 ResId: cmdMsg.ReqId,
854 Error: fmt.Sprintf("link is unauthenticated (%s), cannot call %q", linkMeta.Name(), cmdMsg.Command),
855 }
856 rtnBytes, _ := json.Marshal(rtnMsg)
857 router.sendRpcMessageToLink(linkMeta.linkId, linkMeta.client, rtnBytes, baseds.NoLinkId, "unauthenticated")
858}

Callers 1

runLinkClientRecvLoopMethod · 0.85

Calls 2

sendRpcMessageToLinkMethod · 0.80
NameMethod · 0.45

Tested by

no test coverage detected