{"record":{"id":"03a8a8ae10d3c151","repo":"gastownhall/beads","slug":"error-checking-parent-issue-w","errorCode":null,"errorMessage":"error checking parent issue: %w","messagePattern":"error checking parent issue: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/list_show_filter_modes.go","lineNumber":267,"sourceCode":"\t\tfmt.Printf(\"Issue '%s' has no children\\n\", in.ParentID)\n\t\treturn nil\n\t}\n\n\tdepsByIssueID, err := loadDepsForIssues(ctx, uw, treeIssues)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Hierarchical --parent walks use an unlimited per-level query; never page-truncated.\n\tdisplayPrettyListWithDepsMode(treeIssues, false, depsByIssueID, in.depsMode, false, in.ReadyFlag)\n\tprintSkipLabelsFooter(in.SkipLabels)\n\treturn nil\n}\n\nfunc gatherProxiedHierarchical(ctx context.Context, uw uow.UnitOfWork, parentID string, baseFilter types.IssueFilter) ([]*types.Issue, error) {\n\tparent, err := uw.IssueUseCase().GetIssue(ctx, parentID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error checking parent issue: %w\", err)\n\t}\n\tif parent == nil {\n\t\treturn nil, fmt.Errorf(\"parent issue %q not found\", parentID)\n\t}\n\n\tdescendants, err := uw.IssueUseCase().GetDescendants(ctx, parentID, baseFilter)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error finding descendants: %w\", err)\n\t}\n\tif len(descendants) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tout := make([]*types.Issue, 0, len(descendants)+1)\n\tout = append(out, parent)\n\tout = append(out, descendants...)\n\treturn out, nil\n}","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/list_show_filter_modes.go#L249-L285","documentation":"gatherProxiedHierarchical is the proxied (server/unit-of-work) counterpart of the hierarchical --parent listing. It first calls uw.IssueUseCase().GetIssue to verify the parent; any error returned by that remote/use-case call is wrapped with 'error checking parent issue'.","triggerScenarios":"Running `bd list --parent <id>` when the UOW topology routes through a server/proxy: GetIssue fails due to network errors, auth failures, server unavailability, or a storage error on the remote — anything that returns err rather than a nil issue.","commonSituations":"Server down or unreachable; expired or missing credentials for the shared Dolt server; wrong remote host configured in config.yaml/metadata.json; timeout on large remote databases.","solutions":["Inspect the wrapped error to identify the network vs storage cause","Verify connectivity and credentials for the configured remote","Run `bd doctor` to check server-mode configuration","Retry once connectivity/auth issues are fixed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"out, err := exec.Command(\"bd\", \"list\", \"--parent\", id).CombinedOutput()\nif err != nil && strings.Contains(string(out), \"error checking parent issue\") {\n    time.Sleep(backoff)\n    // retry; if persistent, check server health/auth\n}","preventionTips":["Check remote server health before batch operations","Refresh credentials before long scripted sessions","Validate server-mode config with `bd doctor`"],"tags":["network","cli","proxied-mode"],"backgroundTag":"parent-issue-lookup-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}