{"record":{"id":"9564b6803c6caa7e","repo":"gastownhall/beads","slug":"no-proxied-server-unit-of-work-provider-available","errorCode":null,"errorMessage":"no proxied-server unit-of-work provider available","messagePattern":"no proxied-server unit-of-work provider available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/events.go","lineNumber":334,"sourceCode":"\tacc, ok := storage.UnwrapStore(store).(storage.EventsJournalAccessor)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"storage backend does not support the events journal\")\n\t}\n\treturn acc, nil\n}\n\n// readJournal reads records with seq greater than since from the active\n// storage seam. Proxied-server mode uses its transaction-bound UOW journal\n// capability; direct stores use EventsJournalAccessor.\n//\n// The projection onto the published envelope is eventsjournal.Records, the same\n// one GET /v0/beads/events serves from — see the note on eventsjournal.Record\n// for why there is exactly one.\nfunc readJournal(ctx context.Context, since int64, limit int) ([]eventsjournal.Record, error) {\n\tvar rows []storage.EventsJournalRow\n\tif usesProxiedServer() {\n\t\tif uowProvider == nil {\n\t\t\treturn nil, fmt.Errorf(\"no proxied-server unit-of-work provider available\")\n\t\t}\n\t\tuw, err := uowProvider.NewUOW(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer uw.Close(ctx)\n\t\trows, err = uw.EventsJournalUseCase().Read(ctx, since, limit)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\tacc, err := journalAccessor()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trows, err = acc.ReadEventsJournal(ctx, since, limit)\n\t\tif err != nil {\n\t\t\treturn nil, err","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/events.go#L316-L352","documentation":"In proxied-server mode readJournal does not use the seam store; it needs a unit-of-work provider to open a transaction-bound view of the journal. When usesProxiedServer() is true but the package-level uowProvider is nil, this error fires instead of a nil-pointer dereference.","triggerScenarios":"`bd events` read path executing while the CLI is talking to a proxied server but the uowProvider was never wired (server connection established without UOW support, or wiring code skipped).","commonSituations":"Server/proxy version mismatch where the proxy does not expose the unit-of-work endpoint; a configuration that enables proxied-server mode without registering the provider; partial initialization of server-mode machinery.","solutions":["Verify the proxied server is a current version that supports the events-journal UOW endpoint","Reconnect (`bd doctor`) so server-mode wiring, including uowProvider, is established","If only local reading is needed, run without proxied-server mode so the embedded seam is used","Report/upgrade if the proxy build predates the UOW journal support"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if usesProxiedServer() && !serverSupportsUOW(serverVersion) {\n    return errors.New(\"server lacks events-journal UOW support; use embedded mode\")\n}","typeGuard":null,"tryCatchPattern":"recs, err := readJournal(ctx, since, limit)\nif err != nil && strings.Contains(err.Error(), \"unit-of-work provider\") {\n    recs, err = readJournalEmbeddedFallback(ctx, since, limit)\n}","preventionTips":["Confirm the proxy server version supports the UOW journal endpoint before enabling proxied mode","Re-run connection setup (`bd doctor`) after server upgrades","Fall back to the embedded store for read-only journal access when proxy support is absent"],"tags":["cli","proxied-server","uow"],"backgroundTag":"missing-uow-provider","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}