gastownhall/beads · error
Notion create database response did not include a child data
Error message
Notion create database response did not include a child data source
What it means
During `bd notion init`, bd calls the Notion API to create a database under the given parent and expects the response to contain at least one child data source with a non-empty ID. If Notion returns a database without usable data sources (API version drift, unexpected response shape), bd cannot configure notion.data_source_id and fails with this error.
Source
Thrown at cmd/bd/notion.go:660
}
for _, raw := range issue.Labels {
label := strings.ToLower(strings.TrimSpace(raw))
if _, ok := configured[label]; ok {
return true
}
}
return false
}
func runNotionInitAfterValidation(ctx context.Context, client *notion.Client, parent, title string, setter notionConfigSetter, deleter notionConfigDeleter) (notionSetupResult, error) {
db, err := client.CreateDatabase(ctx, parent, title)
if err != nil {
return notionSetupResult{}, err
}
if len(db.DataSources) == 0 || strings.TrimSpace(db.DataSources[0].ID) == "" {
return notionSetupResult{}, fmt.Errorf("Notion create database response did not include a child data source")
}
result := notionSetupResult{
Action: "init",
DatabaseID: strings.TrimSpace(db.ID),
DataSourceID: strings.TrimSpace(db.DataSources[0].ID),
ViewURL: strings.TrimSpace(db.URL),
Message: "Notion target initialized",
}
if err := saveNotionTargetConfigWithWriter(ctx, setter, deleter, result.DataSourceID, result.ViewURL); err != nil {
return notionSetupResult{}, err
}
return result, nil
}
func runNotionConnectAfterValidation(ctx context.Context, client *notion.Client, url string, setter notionConfigSetter, deleter notionConfigDeleter) (notionSetupResult, error) {
resolved, err := notion.ResolveDataSourceReference(ctx, client, url)
if err != nil {
return notionSetupResult{}, errView on GitHub (pinned to 71377f2769)
Solutions
- Retry `bd notion init` — data source provisioning on Notion's side can be transient.
- Update bd to the latest version so the Notion client matches current API response shapes.
- Check Notion status/incidents; retry later if Notion is degraded.
- As a workaround, create/locate the database manually and use `bd notion connect --url <notion-url>` instead.
Defensive patterns
Strategy: retry
Try / catch
result, err := runNotionInit(cmd, args)
if err != nil && strings.Contains(err.Error(), "did not include a child data source") {
// transient/provisioning issue: back off and retry init once
time.Sleep(2 * time.Second)
return runNotionInit(cmd, args)
} Prevention
- Keep bd updated so the Notion client matches current API responses
- Fall back to `bd notion connect --url` if init keeps failing
- Check Notion service status before bulk provisioning
- Retry init rather than assuming permanent breakage
When it happens
Trigger: runNotionInitAfterValidation calls client.CreateDatabase and receives a response where db.DataSources is empty or DataSources[0].ID is blank/whitespace.
Common situations: Notion API behavior/version change returning a new database whose data sources are provisioned asynchronously; Notion incident/partial response; API client out of date relative to Notion's current response schema.
Related errors
- database is not initialized. Run 'bd init' first
- failed to create .beads directory: %w
- failed to search for existing databases: %w
- Notion authentication is not configured. Set notion.token wi
- notion.data_source_id is not configured. Run 'bd notion init
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/bcf69c48ae3d98cb.
Report an issue: GitHub.