MCPcopy Index your code
hub / github.com/coder/coder / publishError

Method publishError

coderd/x/chatd/chatd.go:5633–5646  ·  view source on GitHub ↗
(chatID uuid.UUID, classified chaterror.ClassifiedError)

Source from the content-addressed store, hash-verified

5631}
5632
5633func (p *Server) publishError(chatID uuid.UUID, classified chaterror.ClassifiedError) {
5634 payload := chaterror.TerminalErrorPayload(classified)
5635 if payload == nil {
5636 return
5637 }
5638 p.publishEvent(chatID, codersdk.ChatStreamEvent{
5639 Type: codersdk.ChatStreamEventTypeError,
5640 Error: payload,
5641 })
5642 p.publishChatStreamNotify(chatID, coderdpubsub.ChatStreamNotifyMessage{
5643 ErrorPayload: payload,
5644 Error: payload.Message,
5645 })
5646}
5647
5648func processingFailure(err error) (chaterror.ClassifiedError, bool) {
5649 if err == nil {

Calls 3

publishEventMethod · 0.95
TerminalErrorPayloadFunction · 0.92