gastownhall/beads · error
proxied-server UOW provider not initialized
Error message
proxied-server UOW provider not initialized
What it means
proxiedMutateIssue is the proxied-server path for mutating an issue inside a unit-of-work transaction. It depends on the package-level uowProvider being initialized during server startup. If it is nil, the server was never wired to a UOW provider, so no mutation can be executed and this error is returned instead of panicking.
Source
Thrown at cmd/bd/mutate_proxied_server.go:19
package main
import (
"context"
"errors"
"fmt"
"github.com/steveyegge/beads/internal/storage"
"github.com/steveyegge/beads/internal/storage/uow"
"github.com/steveyegge/beads/internal/types"
"github.com/steveyegge/beads/internal/ui"
"github.com/steveyegge/beads/internal/validation"
"github.com/steveyegge/beads/internal/workapi"
"github.com/steveyegge/beads/issueops"
)
func proxiedMutateIssue(ctx context.Context, id, commitMsg string, mutate func(ctx context.Context, uw uow.UnitOfWork, issue *types.Issue, isWisp bool) error) (*types.Issue, error) {
if uowProvider == nil {
return nil, fmt.Errorf("proxied-server UOW provider not initialized")
}
var updated *types.Issue
err := uow.RunTx(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (string, error) {
issue, isWisp, rerr := workapi.GetIssueOrWisp(ctx, workapi.NewUOWDetailSource(uw), id)
if errors.Is(rerr, storage.ErrNotFound) {
return "", fmt.Errorf("issue %s not found", id)
}
if rerr != nil {
return "", fmt.Errorf("resolving %s: %w", id, rerr)
}
if err := validateIssueUpdatable(id, issue); err != nil {
return "", err
}
if err := mutate(ctx, uw, issue, isWisp); err != nil {
return "", err
}
if isWisp {
updated, _ = uw.IssueUseCase().GetWisp(ctx, issue.ID)View on GitHub (pinned to 71377f2769)
Solutions
- Ensure the proxied-server startup path initializes uowProvider before serving requests.
- If running a standard `bd` server, restart via the official entrypoint (e.g. `bd serve`/proxy mode) rather than custom code.
- If embedding, add the UOW provider setup (storage-backed uow provider) to your server bootstrap before handling requests.
Defensive patterns
Strategy: validation
Validate before calling
// Embedders: assert wiring before calling proxied mutations
if uowProvider == nil {
return errors.New("server bootstrap incomplete: initialize uowProvider before handling mutations")
} Try / catch
issue, err := proxiedMutateIssue(ctx, id, msg, mutate)
if err != nil && strings.Contains(err.Error(), "UOW provider not initialized") {
// re-initialize server or fall back to direct (non-proxied) mutation path
} Prevention
- Always start the proxied server through its official entrypoint
- In embedded setups, initialize uowProvider as the first bootstrap step
- Add a startup assertion/log if uowProvider is nil when serving begins
- Cover server bootstrap in tests so missing wiring fails fast
When it happens
Trigger: Any proxied mutation path — proxiedUpdateIssueFields or `bd note` via runNoteProxiedServer — executing when the proxied server process was constructed without calling the uowProvider initialization (nil package variable).
Common situations: Embedding/starting the bd proxied server in a custom bootstrap that skips UOW provider setup; calling mutation handlers before server initialization completes; refactor removing initialization code.
Related errors
- %w. Hint: run 'bd init' to create a database in the current
- no store available
- loading dependencies: %w
- no database connection
- no linear client
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/97d116206fabd9d4.
Report an issue: GitHub.