{"record":{"id":"fc2489fdf847a312","repo":"gastownhall/beads","slug":"loading-dependencies-w","errorCode":null,"errorMessage":"loading dependencies: %w","messagePattern":"loading dependencies: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/graph_proxied_server.go","lineNumber":93,"sourceCode":"\t\t\tsubgraph.IssueMap[iss.ID] = &iss\n\t\t\tqueue = append(queue, iss.ID)\n\t\t}\n\t}\n\n\tfor len(queue) > 0 {\n\t\tcurrentID := queue[0]\n\t\tqueue = queue[1:]\n\t\taddNeighbors(currentID, domain.DepDirectionIn)  // dependents\n\t\taddNeighbors(currentID, domain.DepDirectionOut) // dependencies\n\t}\n\n\tids := make([]string, 0, len(subgraph.Issues))\n\tfor _, iss := range subgraph.Issues {\n\t\tids = append(ids, iss.ID)\n\t}\n\trecs, err := uw.DependencyUseCase().GetIssueDependencyRecords(ctx, ids)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"loading dependencies: %w\", err)\n\t}\n\tfor _, iss := range subgraph.Issues {\n\t\tfor _, dep := range recs[iss.ID] {\n\t\t\tif _, ok := subgraph.IssueMap[dep.DependsOnID]; ok {\n\t\t\t\tsubgraph.Dependencies = append(subgraph.Dependencies, dep)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn subgraph, nil\n}\n\nfunc loadAllGraphSubgraphsUOW(ctx context.Context, uw uow.UnitOfWork) ([]*TemplateSubgraph, error) {\n\tvar allIssues []*types.Issue\n\tfor _, status := range []types.Status{types.StatusOpen, types.StatusInProgress, types.StatusBlocked} {\n\t\tstatusCopy := status\n\t\tpage, err := uw.IssueUseCase().SearchIssues(ctx, \"\", types.IssueFilter{Status: &statusCopy})\n\t\tif err != nil {","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/graph_proxied_server.go#L75-L111","documentation":"In proxied-server mode, loadGraphSubgraphUOW loads dependency records for all issues in a subgraph via DependencyUseCase().GetIssueDependencyRecords; failure is wrapped with this message. The wrapped error from the use case/storage layer is the real cause.","triggerScenarios":"bd serve (proxied graph server) handling a graph request where the batch dependency-record fetch for the subgraph issue IDs fails.","commonSituations":"Backend storage unreachable from the server; one of the subgraph issue IDs was deleted concurrently; permission/routing errors in proxied mode.","solutions":["Inspect the wrapped cause and fix the underlying storage/use-case error","Retry the graph request","Verify the issues in the requested subgraph still exist and are accessible from the server"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"resp, err := client.FetchGraph(ctx, rootID)\nif err != nil && strings.Contains(err.Error(), \"loading dependencies\") {\n  time.Sleep(backoff)\n  resp, err = client.FetchGraph(ctx, rootID) // transient storage failure retry\n}","preventionTips":["Monitor server-to-storage connectivity in proxied mode","Handle deleted-issue races by refreshing subgraph membership","Pin stable server/storage versions during bulk graph operations"],"tags":["go","server","storage","graph"],"backgroundTag":"dependency-record-load-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}