{"record":{"id":"32510a45b5947ea0","repo":"sipeed/picoclaw","slug":"s-decode-w","errorCode":null,"errorMessage":"%s decode: %w","messagePattern":"(.+?) decode: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":657,"sourceCode":"\t}\n\n\traw, err = c.rpc.call(ctx, \"create_chat_by_contact_id\", c.accountID, contactID)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"create chat by contact: %w\", err)\n\t}\n\tif err := json.Unmarshal(raw, &chatID); err != nil {\n\t\treturn 0, fmt.Errorf(\"create chat by contact decode: %w\", err)\n\t}\n\tif chatID <= 0 {\n\t\treturn 0, fmt.Errorf(\"create chat by contact returned empty id: %w\", channels.ErrSendFailed)\n\t}\n\treturn chatID, nil\n}\n\nfunc decodeOptionalInt64(raw json.RawMessage, label string) (int64, error) {\n\tvar id *int64\n\tif err := json.Unmarshal(raw, &id); err != nil {\n\t\treturn 0, fmt.Errorf(\"%s decode: %w\", label, err)\n\t}\n\tif id == nil {\n\t\treturn 0, nil\n\t}\n\treturn *id, nil\n}\n\nfunc (c *DeltaChatChannel) resolveAliasChatID(ctx context.Context, target string) (int64, error) {\n\tfor _, query := range aliasQueries(target) {\n\t\tcontacts, err := c.findMatchingContacts(ctx, query)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tif len(contacts) == 1 {\n\t\t\treturn c.chatIDForContact(ctx, contacts[0].ID)\n\t\t}\n\t\tif len(contacts) > 1 {\n\t\t\treturn 0, ambiguousRecipientError(target, contactRecipientLabels(contacts))","sourceCodeStart":639,"sourceCodeEnd":675,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L639-L675","documentation":"Error \"%s decode: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/deltachat/deltachat.go:657 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}