{"record":{"id":"27d4f7e67a6693fa","repo":"sipeed/picoclaw","slug":"get-chat-d-decode-w","errorCode":null,"errorMessage":"get chat %d decode: %w","messagePattern":"get chat (.+?) decode: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":854,"sourceCode":"\nfunc exactChatMatches(query string, chats []dcChat) []dcChat {\n\tvar matches []dcChat\n\tfor _, chat := range chats {\n\t\tif strings.EqualFold(strings.TrimSpace(chat.Name), strings.TrimSpace(query)) {\n\t\t\tmatches = append(matches, chat)\n\t\t}\n\t}\n\treturn matches\n}\n\nfunc (c *DeltaChatChannel) getFullChatByContext(ctx context.Context, chatID int64) (*dcChat, error) {\n\traw, err := c.rpc.call(ctx, \"get_full_chat_by_id\", c.accountID, chatID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"get chat %d: %w\", chatID, err)\n\t}\n\tvar chat dcChat\n\tif err := json.Unmarshal(raw, &chat); err != nil {\n\t\treturn nil, fmt.Errorf(\"get chat %d decode: %w\", chatID, err)\n\t}\n\treturn &chat, nil\n}\n\nfunc ambiguousRecipientError(target string, labels []string) error {\n\treturn fmt.Errorf(\n\t\t\"ambiguous recipient %q matches %s: %w\",\n\t\ttarget,\n\t\tstrings.Join(labels, \", \"),\n\t\tchannels.ErrSendFailed,\n\t)\n}\n\nfunc contactRecipientLabels(contacts []dcContact) []string {\n\tlabels := make([]string, 0, len(contacts))\n\tfor _, contact := range contacts {\n\t\tname := strings.TrimSpace(contact.DisplayName)\n\t\tif name == \"\" {","sourceCodeStart":836,"sourceCodeEnd":872,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L836-L872","documentation":"Fired in getFullChatByContext when the JSON response from the get_full_chat_by_id RPC cannot be unmarshalled into a dcChat struct. Means the Delta Chat core returned a payload that does not match the expected chat schema for chatID, so callers such as findMatchingChats cannot build the full chat record.","triggerScenarios":"Thrown at pkg/channels/deltachat/deltachat.go:854 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Log the raw response to inspect the unexpected JSON shape","Verify deltachat-rpc-server schema compatibility","Fail resolution with a descriptive decode error instead of using a partially populated chat"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}