{"record":{"id":"ce582ced07fcae02","repo":"gastownhall/beads","slug":"getblockedissues-w","errorCode":null,"errorMessage":"GetBlockedIssues: %w","messagePattern":"GetBlockedIssues: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/domain/issue.go","lineNumber":1817,"sourceCode":"\t)\n\tif useWisp {\n\t\tissue, err = u.issueRepo.ClaimReadyWisp(ctx, filter, actor)\n\t} else {\n\t\tissue, err = u.issueRepo.ClaimReadyIssue(ctx, filter, actor)\n\t}\n\tif err != nil {\n\t\tif useWisp {\n\t\t\treturn ClaimReadyResult{}, fmt.Errorf(\"ClaimReadyWisp: %w\", err)\n\t\t}\n\t\treturn ClaimReadyResult{}, fmt.Errorf(\"ClaimReadyIssue: %w\", err)\n\t}\n\treturn ClaimReadyResult{Issue: issue, Claimed: issue != nil}, nil\n}\n\nfunc (u *issueUseCaseImpl) GetBlockedIssues(ctx context.Context, filter types.WorkFilter) ([]*types.BlockedIssue, error) {\n\tout, err := u.issueRepo.GetBlockedIssues(ctx, filter)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"GetBlockedIssues: %w\", err)\n\t}\n\treturn out, nil\n}\n\nfunc (u *issueUseCaseImpl) GetStatistics(ctx context.Context) (*types.Statistics, error) {\n\tout, err := u.issueRepo.GetStatistics(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"GetStatistics: %w\", err)\n\t}\n\treturn out, nil\n}\n\nfunc (u *issueUseCaseImpl) CountIssues(ctx context.Context, query string, filter types.IssueFilter) (int64, error) {\n\tout, err := u.issueRepo.CountIssues(ctx, query, filter)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"CountIssues: %w\", err)\n\t}\n\treturn out, nil","sourceCodeStart":1799,"sourceCodeEnd":1835,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/domain/issue.go#L1799-L1835","documentation":"Pass-through wrapper from GetBlockedIssues in the issue use-case: it wraps any error from issueRepo.GetBlockedIssues without adding context beyond the label. Callers see 'GetBlockedIssues: <root cause>'. It indicates the blocked-issues report query failed in storage.","triggerScenarios":"Calling GetBlockedIssues(ctx, filter) when the repository's blocked-issue computation (dependency join against issue statuses) errors — invalid filter fields, storage outage, or malformed dependency rows.","commonSituations":"Running blocked-issue reports with a filter referencing nonexistent labels or priorities; database unreachable; schema drift after an upgrade leaving orphaned dependency rows.","solutions":["Read the wrapped error after 'GetBlockedIssues:' for the root cause","Validate WorkFilter values (labels, priority, assignee) before querying","Retry on transient DB errors; verify connectivity if persistent","Check for orphaned dependency rows if the error mentions joins/constraints"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if err := validateFilter(filter); err != nil {\n    return err\n}","typeGuard":null,"tryCatchPattern":"blocked, err := uc.GetBlockedIssues(ctx, filter)\nif err != nil {\n    log.Warnf(\"blocked-issues report unavailable: %v\", err)\n    return nil\n}","preventionTips":["Validate filter fields (labels, priorities) against supported values","Retry transient storage errors with backoff","Monitor DB connectivity for scheduled report jobs","Clean up orphaned dependency rows after schema changes"],"tags":["go","storage","error-wrapping","blocked-issues"],"backgroundTag":"repository-query-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}