{"record":{"id":"655d0b73fdac73be","repo":"gastownhall/beads","slug":"issue-s-not-found-655d0b","errorCode":null,"errorMessage":"issue %s not found","messagePattern":"issue (.+?) not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/mutate_proxied_server.go","lineNumber":25,"sourceCode":"\n\t\"github.com/steveyegge/beads/internal/storage\"\n\t\"github.com/steveyegge/beads/internal/storage/uow\"\n\t\"github.com/steveyegge/beads/internal/types\"\n\t\"github.com/steveyegge/beads/internal/ui\"\n\t\"github.com/steveyegge/beads/internal/validation\"\n\t\"github.com/steveyegge/beads/internal/workapi\"\n\t\"github.com/steveyegge/beads/issueops\"\n)\n\nfunc proxiedMutateIssue(ctx context.Context, id, commitMsg string, mutate func(ctx context.Context, uw uow.UnitOfWork, issue *types.Issue, isWisp bool) error) (*types.Issue, error) {\n\tif uowProvider == nil {\n\t\treturn nil, fmt.Errorf(\"proxied-server UOW provider not initialized\")\n\t}\n\tvar updated *types.Issue\n\terr := uow.RunTx(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (string, error) {\n\t\tissue, isWisp, rerr := workapi.GetIssueOrWisp(ctx, workapi.NewUOWDetailSource(uw), id)\n\t\tif errors.Is(rerr, storage.ErrNotFound) {\n\t\t\treturn \"\", fmt.Errorf(\"issue %s not found\", id)\n\t\t}\n\t\tif rerr != nil {\n\t\t\treturn \"\", fmt.Errorf(\"resolving %s: %w\", id, rerr)\n\t\t}\n\t\tif err := validateIssueUpdatable(id, issue); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif err := mutate(ctx, uw, issue, isWisp); err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tif isWisp {\n\t\t\tupdated, _ = uw.IssueUseCase().GetWisp(ctx, issue.ID)\n\t\t} else {\n\t\t\tupdated, _ = uw.IssueUseCase().GetIssue(ctx, issue.ID)\n\t\t}\n\t\treturn commitMsg, nil\n\t})\n\tif err != nil {","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/mutate_proxied_server.go#L7-L43","documentation":"Inside the mutation transaction, workapi.GetIssueOrWisp resolves the issue by ID. If it returns storage.ErrNotFound, the code translates that into a user-facing 'issue <id> not found' error. This is the authoritative existence check before any mutation runs.","triggerScenarios":"Calling any proxied mutation (update fields, `bd note`, etc.) with an issue ID that does not exist in the database (neither as a regular issue nor a wisp).","commonSituations":"Typo in issue ID (e.g. bd-1234 vs bd-1243); issue deleted on another machine and the deletion synced; operating against a different database (wrong cwd/prefix) than the one containing the issue; wisp already collapsed/purged.","solutions":["Verify the ID with `bd show <id>` or `bd list`; correct typos in the ID.","Run `bd sync`/`bd dolt pull` to pick up deletions/creations from other machines.","Confirm you are in the repo/workspace with the right .beads database.","If the issue should exist, recreate it or restore from history."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify the issue exists before mutating\nout, err := exec.Command(\"bd\", \"show\", id, \"--json\").Output()\nif err != nil || len(out) == 0 {\n    return fmt.Errorf(\"skip mutation: %s does not exist locally\", id)\n}","typeGuard":null,"tryCatchPattern":"_, err := proxiedUpdateIssueFields(ctx, id, fields)\nif err != nil && strings.Contains(err.Error(), \"not found\") {\n    // treat as absent: correct ID, sync, or skip gracefully\n}","preventionTips":["Copy issue IDs from `bd list`/`bd ready` output instead of typing them","Run `bd sync` before operating across machines","Check `bd show <id>` before scripted bulk updates","Confirm the working directory matches the intended beads database"],"tags":["go","not-found","cli"],"backgroundTag":"resource-not-found","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}