gastownhall/beads · error
store does not support config deletion
Error message
store does not support config deletion
What it means
saveNotionTargetConfigWithWriter deletes 'notion.view_url' when an empty view URL is supplied, but deletion requires a deleter capability. If the store passed in implements only notionConfigSetter and its deleter is nil, this error is thrown: the store does not support config deletion.
Source
Thrown at cmd/bd/notion.go:717
func notionConfigDeleteTarget() notionConfigDeleter {
if store == nil {
return nil
}
deleter, _ := storage.UnwrapStore(store).(notionConfigDeleter)
return deleter
}
func saveNotionTargetConfigWithWriter(ctx context.Context, setter notionConfigSetter, deleter notionConfigDeleter, dataSourceID, viewURL string) error {
if setter == nil {
return fmt.Errorf("database not available")
}
if err := setter.SetConfig(ctx, "notion.data_source_id", strings.TrimSpace(dataSourceID)); err != nil {
return fmt.Errorf("save notion.data_source_id: %w", err)
}
viewURL = strings.TrimSpace(viewURL)
if viewURL == "" {
if deleter == nil {
return fmt.Errorf("store does not support config deletion")
}
if err := deleter.DeleteConfig(ctx, "notion.view_url"); err != nil {
return fmt.Errorf("clear notion.view_url: %w", err)
}
return nil
}
if err := setter.SetConfig(ctx, "notion.view_url", viewURL); err != nil {
return fmt.Errorf("save notion.view_url: %w", err)
}
return nil
}
func writeNotionJSON(cmd *cobra.Command, value interface{}) error {
encoder := json.NewEncoder(cmd.OutOrStdout())
encoder.SetIndent("", " ")
return encoder.Encode(value)
}
View on GitHub (pinned to 71377f2769)
Solutions
- Use a store that implements config deletion (upgrade beads / use the default Dolt store).
- Provide a non-empty --view-url so the deleter path is skipped and the URL is overwritten instead.
- Update the existing notion.view_url to a placeholder then remove it with a deletion-capable store.
- Check which store the --db flag points to; switch to a deletion-capable backend.
Example fix
// before bd notion init --data-source-id abc # clears view_url; store lacks deletion -> error // after bd notion init --data-source-id abc --view-url https://notion.so/my-view
Defensive patterns
Strategy: fallback
Validate before calling
if viewURL == "" {
if deleter == nil {
// pre-check: cannot clear view_url on this store
return errors.New("current store cannot delete config; provide --view-url or upgrade")
}
} Type guard
func supportsConfigDelete(s interface{}) bool {
d, ok := s.(interface{ DeleteConfig(context.Context, string) error })
return ok && d != nil
} Try / catch
if err := saveNotionTargetConfigWithWriter(ctx, setter, deleter, dsID, viewURL); err != nil {
if strings.Contains(err.Error(), "does not support config deletion") {
// retry with a non-empty viewURL or a deletion-capable store
}
return err
} Prevention
- Use the default Dolt store which supports config deletion
- Always pass --view-url when the backend may lack deletion support
- Check store capabilities before attempting clears
- Upgrade beads if your backend predates config deletion
When it happens
Trigger: Calling bd notion init/connect (or the anonymous caller) with viewURL == "" (to clear the view URL) against a store whose DeleteConfig capability is nil — i.e. a store implementation that lacks the config-deletion interface.
Common situations: Users clearing the Notion view URL ('bd notion init --data-source-id X' with no --view-url) while connected to a store/remote or older storage backend that doesn't implement config deletion.
Related errors
- Notion authentication is not configured. Set notion.token wi
- notion.data_source_id is not configured. Run 'bd notion init
- database not available
- save notion.data_source_id: %w
- clear notion.view_url: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/7e195231b1b21dcd.
Report an issue: GitHub.