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

Function encodeChatLastErrorPayload

coderd/x/chatd/chatd.go:5660–5669  ·  view source on GitHub ↗
(payload *codersdk.ChatError)

Source from the content-addressed store, hash-verified

5658}
5659
5660func encodeChatLastErrorPayload(payload *codersdk.ChatError) (pqtype.NullRawMessage, error) {
5661 if payload == nil {
5662 return pqtype.NullRawMessage{}, nil
5663 }
5664 encoded, err := json.Marshal(payload)
5665 if err != nil {
5666 return pqtype.NullRawMessage{}, err
5667 }
5668 return pqtype.NullRawMessage{RawMessage: encoded, Valid: true}, nil
5669}
5670
5671func panicFailureReason(recovered any) string {
5672 var reason string

Callers 3

FinishActiveChatForTestFunction · 0.85
processChatMethod · 0.85
recoverStaleChatsMethod · 0.85

Calls 1

MarshalMethod · 0.45

Tested by 1

FinishActiveChatForTestFunction · 0.68