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, nil

View on GitHub (pinned to 71377f2769)

Solutions

  1. Read the wrapped error after 'GetBlockedIssues:' for the root cause
  2. Validate WorkFilter values (labels, priority, assignee) before querying
  3. Retry on transient DB errors; verify connectivity if persistent
  4. 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

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


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/ce582ced07fcae02. Report an issue: GitHub.