gastownhall/beads · error
GetBlockedIssues: %w
Error message
GetBlockedIssues: %w
What it means
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.
Source
Thrown at internal/storage/domain/issue.go:1817
)
if useWisp {
issue, err = u.issueRepo.ClaimReadyWisp(ctx, filter, actor)
} else {
issue, err = u.issueRepo.ClaimReadyIssue(ctx, filter, actor)
}
if err != nil {
if useWisp {
return ClaimReadyResult{}, fmt.Errorf("ClaimReadyWisp: %w", err)
}
return ClaimReadyResult{}, fmt.Errorf("ClaimReadyIssue: %w", err)
}
return ClaimReadyResult{Issue: issue, Claimed: issue != nil}, nil
}
func (u *issueUseCaseImpl) GetBlockedIssues(ctx context.Context, filter types.WorkFilter) ([]*types.BlockedIssue, error) {
out, err := u.issueRepo.GetBlockedIssues(ctx, filter)
if err != nil {
return nil, fmt.Errorf("GetBlockedIssues: %w", err)
}
return out, nil
}
func (u *issueUseCaseImpl) GetStatistics(ctx context.Context) (*types.Statistics, error) {
out, err := u.issueRepo.GetStatistics(ctx)
if err != nil {
return nil, fmt.Errorf("GetStatistics: %w", err)
}
return out, nil
}
func (u *issueUseCaseImpl) CountIssues(ctx context.Context, query string, filter types.IssueFilter) (int64, error) {
out, err := u.issueRepo.CountIssues(ctx, query, filter)
if err != nil {
return 0, fmt.Errorf("CountIssues: %w", err)
}
return out, nilView on GitHub (pinned to 71377f2769)
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
Defensive patterns
Strategy: try-catch
Validate before calling
if err := validateFilter(filter); err != nil {
return err
} Try / catch
blocked, err := uc.GetBlockedIssues(ctx, filter)
if err != nil {
log.Warnf("blocked-issues report unavailable: %v", err)
return nil
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Running blocked-issue reports with a filter referencing nonexistent labels or priorities; database unreachable; schema drift after an upgrade leaving orphaned dependency rows.
Related errors
- not found
- load wisp labels: %w
- edge %d %s->%s: checking planned blocking cycle: %w
- reading existing dependencies for %s: %w
- CountOpenChildren %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/ce582ced07fcae02.
Report an issue: GitHub.