{"record":{"id":"be9235915aa82947","repo":"gastownhall/beads","slug":"getissuedependencyrecords-w","errorCode":null,"errorMessage":"GetIssueDependencyRecords: %w","messagePattern":"GetIssueDependencyRecords: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/domain/dependency.go","lineNumber":810,"sourceCode":"\n// CycleThroughEdges passes the pairs straight to the repository walk\n// AddDependencies runs as its own final gate. The caller composes the refusal,\n// because the two callers word it differently and both spellings are already\n// pinned.\nfunc (u *dependencyUseCaseImpl) CycleThroughEdges(ctx context.Context, edges [][2]string) (string, error) {\n\tif len(edges) == 0 {\n\t\treturn \"\", nil\n\t}\n\treturn u.depRepo.CycleThroughEdges(ctx, edges)\n}\n\nfunc (u *dependencyUseCaseImpl) GetIssueDependencyRecords(ctx context.Context, issueIDs []string) (map[string][]*types.Dependency, error) {\n\tif len(issueIDs) == 0 {\n\t\treturn map[string][]*types.Dependency{}, nil\n\t}\n\tout, err := u.depRepo.GetDependencyRecordsForIssues(ctx, issueIDs)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"GetIssueDependencyRecords: %w\", err)\n\t}\n\treturn out, nil\n}\n\nfunc (u *dependencyUseCaseImpl) GetWispDependencyRecords(ctx context.Context, wispIDs []string) (map[string][]*types.Dependency, error) {\n\tif len(wispIDs) == 0 {\n\t\treturn map[string][]*types.Dependency{}, nil\n\t}\n\tout, err := u.depRepo.GetWispDependencyRecordsForIDs(ctx, wispIDs)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"GetWispDependencyRecords: %w\", err)\n\t}\n\treturn out, nil\n}\n","sourceCodeStart":792,"sourceCodeEnd":825,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/domain/dependency.go#L792-L825","documentation":"GetIssueDependencyRecords fetches dependency records for a batch of regular issue IDs via depRepo.GetDependencyRecordsForIssues. This error wraps any repository failure of that lookup. Empty input short-circuits to an empty map without touching storage, so the error only occurs on non-empty queries that fail at the storage layer.","triggerScenarios":"Calling GetIssueDependencyRecords with one or more issueIDs when the underlying repository query fails — DB unreachable, query error, or context canceled.","commonSituations":"Corrupt or locked .beads Dolt database; connection pool exhaustion; canceled request context during shutdown.","solutions":["Check the wrapped root error after the prefix","Verify database health (bd doctor) and that no other process holds a conflicting lock","Retry with a live context"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if len(issueIDs) == 0 { return map[string][]*types.Dependency{} } // mirrors the short-circuit","typeGuard":null,"tryCatchPattern":"recs, err := uc.GetIssueDependencyRecords(ctx, ids)\nif err != nil {\n    // wrapped storage error; check DB health / context before retrying\n    return fmt.Errorf(\"dependency records unavailable: %w\", err)\n}","preventionTips":["Skip the call for empty ID slices (it short-circuits anyway)","Pass live contexts with sufficient deadlines","Monitor Dolt database health in long-running processes"],"tags":["dependencies","storage","read"],"backgroundTag":"storage-query-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}