sipeed/picoclaw · error
search contacts
Error message
search contacts: %w
What it means
Wraps a failure of the deltachat RPC 'get_contacts' call made by findMatchingContacts when resolving a recipient alias to contacts. It fires whenever the RPC transport or server rejects the query (timeout, JSON-RPC error, closed server).
Solutions
- Check that the deltachat-rpc-server process is still running and connected via the account's start_io state
- Retry the contact search; transient RPC failures are common while the server is starting
- Log the underlying RPC error for diagnosis and surface a generic 'recipient lookup failed' to the user
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pkg/channels/deltachat/deltachat.go:728 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/590707ff875b3101.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/channels/deltachat/deltachat.go:728
for _, value := range values {
value = strings.TrimSpace(value)
if value == "" {
continue
}
key := strings.ToLower(value)
if _, ok := seen[key]; ok {
continue
}
seen[key] = struct{}{}
out = append(out, value)
}
return out
}
func (c *DeltaChatChannel) findMatchingContacts(ctx context.Context, query string) ([]dcContact, error) {
raw, err := c.rpc.call(ctx, "get_contacts", c.accountID, 0, query)
if err != nil {
return nil, fmt.Errorf("search contacts: %w", err)
}
var contacts []dcContact
if err := json.Unmarshal(raw, &contacts); err != nil {
return nil, fmt.Errorf("search contacts decode: %w", err)
}
contacts = uniqueContacts(contacts)
if exact := exactContactMatches(query, contacts); len(exact) > 0 {
return exact, nil
}
if len(contacts) == 1 {
return contacts, nil
}
return nil, nil
}
func uniqueContacts(contacts []dcContact) []dcContact {
seen := make(map[int64]struct{}, len(contacts))
out := make([]dcContact, 0, len(contacts))View on GitHub (pinned to 49183d7e8d)