{"record":{"id":"f8d05f04cae0a974","repo":"sipeed/picoclaw","slug":"deltachat-set-bot-config-w","errorCode":null,"errorMessage":"deltachat set bot config: %w","messagePattern":"deltachat set bot config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/deltachat/deltachat.go","lineNumber":1025,"sourceCode":"\t\t\t})\n\t\t\tchanged = true\n\t\t}\n\t\tif changed {\n\t\t\tif err := c.configureAccount(ctx, accountID); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif _, err := c.rpc.call(ctx, \"select_account\", accountID); err != nil {\n\t\treturn fmt.Errorf(\"deltachat select_account: %w\", err)\n\t}\n\tif err := c.applyProfileConfig(ctx, accountID); err != nil {\n\t\treturn err\n\t}\n\t// Mark this account as a bot so the core delivers all messages to us.\n\tif _, err := c.rpc.call(ctx, \"batch_set_config\", accountID, map[string]string{\"bot\": \"1\"}); err != nil {\n\t\treturn fmt.Errorf(\"deltachat set bot config: %w\", err)\n\t}\n\tif _, err := c.rpc.call(ctx, \"start_io\", accountID); err != nil {\n\t\treturn fmt.Errorf(\"deltachat start_io: %w\", err)\n\t}\n\n\tc.accountID = accountID\n\treturn nil\n}\n\nfunc (c *DeltaChatChannel) createChatmailBootstrapAccount(ctx context.Context, server string) error {\n\traw, err := c.rpc.call(ctx, \"add_account\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"deltachat add_account: %w\", err)\n\t}\n\tvar accountID int64\n\tif decodeErr := json.Unmarshal(raw, &accountID); decodeErr != nil {\n\t\treturn fmt.Errorf(\"deltachat add_account decode: %w\", decodeErr)\n\t}","sourceCodeStart":1007,"sourceCodeEnd":1043,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/deltachat/deltachat.go#L1007-L1043","documentation":"Fired when the batch_set_config RPC that sets the 'bot' flag to 1 fails. This flag tells Delta Chat core to deliver all messages to the bot; if setting it fails, the account would run unconfigured as a bot, so startup is aborted with this wrapped error.","triggerScenarios":"Thrown at pkg/channels/deltachat/deltachat.go:1025 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the config call; transient RPC failures can occur right after start","Confirm the account was selected successfully before configuring","Inspect the core logs for config-write permission problems"],"exampleFix":null,"handlingStrategy":"retry","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"}