{"record":{"id":"ae62301a85f3f4fb","repo":"sipeed/picoclaw","slug":"deltachat-is-configured-w","errorCode":null,"errorMessage":"deltachat is_configured: %w","messagePattern":"deltachat is_configured: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1249,"sourceCode":"\treturn accountConfigString(strconv.Itoa(value))\n}\n\nfunc (c *DeltaChatChannel) listAccounts(ctx context.Context) ([]dcAccount, error) {\n\traw, err := c.rpc.call(ctx, \"get_all_accounts\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"deltachat get_all_accounts: %w\", err)\n\t}\n\tvar accounts []dcAccount\n\tif err := json.Unmarshal(raw, &accounts); err != nil {\n\t\treturn nil, fmt.Errorf(\"deltachat get_all_accounts decode: %w\", err)\n\t}\n\treturn accounts, nil\n}\n\nfunc (c *DeltaChatChannel) isConfigured(ctx context.Context, accountID int64) (bool, error) {\n\traw, err := c.rpc.call(ctx, \"is_configured\", accountID)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"deltachat is_configured: %w\", err)\n\t}\n\tvar ok bool\n\tif err := json.Unmarshal(raw, &ok); err != nil {\n\t\treturn false, fmt.Errorf(\"deltachat is_configured decode: %w\", err)\n\t}\n\treturn ok, nil\n}\n\n// joinInviteLink optionally joins a chat via a configured invite/QR link.\nfunc (c *DeltaChatChannel) joinInviteLink(ctx context.Context) error {\n\tlink := strings.TrimSpace(c.config.InviteLink)\n\tif link == \"\" {\n\t\treturn nil\n\t}\n\tchatRaw, err := c.rpc.call(ctx, \"secure_join\", c.accountID, link)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":1231,"sourceCodeEnd":1267,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1231-L1267","documentation":"isConfigured's JSON-RPC call 'is_configured' failed at transport/server level. This is distinct from the account simply being unconfigured (which returns false, not an error): here the question could not be asked.","triggerScenarios":"c.rpc.call(ctx, \"is_configured\", accountID) errors: dead server, closed connection, canceled ctx, or a stale accountID the core rejects.","commonSituations":"Account removed out-of-band between listAccounts and this call; RPC child crash mid-startup.","solutions":["Re-check the account exists via get_all_accounts","Probe server liveness with get_system_info","Restart the channel/PicoClaw to re-run ensureAccount from scratch"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"ok, err := c.isConfigured(ctx, accountID)\nif err != nil {\n    // distinguish 'could not ask' from 'not configured': only the latter should trigger configureAccount\n    return false, fmt.Errorf(\"deltachat is_configured: %w\", err)\n}","preventionTips":["Do not remove accounts out-of-band while PicoClaw is running","On transport errors, re-run ensureAccount from listAccounts rather than reusing accountIDs"],"tags":["deltachat","rpc","account","go"],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}