gastownhall/beads · error
GetForIssueIDs (wisps): %w
Error message
GetForIssueIDs (wisps): %w
What it means
Wraps a failure from depRepo.ListByIssueIDs against the wisps table — but only for errors that are NOT dberrors.IsTableNotExist. A missing wisps table is tolerated (returns empty), so this error means a real failure occurred while reading wisp dependencies.
Source
Thrown at internal/storage/domain/dependency.go:493
func (u *dependencyUseCaseImpl) CountByIssueID(ctx context.Context, issueID string, filter DepListFilter) (int64, error) {
return u.countByID(ctx, issueID, filter, false)
}
func (u *dependencyUseCaseImpl) GetForIssueIDs(ctx context.Context, ids []string) (map[string][]*types.Dependency, error) {
if len(ids) == 0 {
return map[string][]*types.Dependency{}, nil
}
issueRes, err := u.depRepo.ListByIssueIDs(ctx, ids, DepListOpts{Direction: DepDirectionOut})
if err != nil {
return nil, fmt.Errorf("GetForIssueIDs: %w", err)
}
out := issueRes.Outgoing
if out == nil {
out = make(map[string][]*types.Dependency)
}
wispRes, err := u.depRepo.ListByIssueIDs(ctx, ids, DepListOpts{Direction: DepDirectionOut, UseWispsTable: true})
if err != nil && !dberrors.IsTableNotExist(err) {
return nil, fmt.Errorf("GetForIssueIDs (wisps): %w", err)
}
for id, deps := range wispRes.Outgoing {
out[id] = append(out[id], deps...)
}
return out, nil
}
func (u *dependencyUseCaseImpl) ListByWispIDs(ctx context.Context, wispIDs []string, filter DepListFilter) (DepBulkResult, error) {
return u.list(ctx, wispIDs, filter, true)
}
func (u *dependencyUseCaseImpl) ListWispWithIssueMetadata(ctx context.Context, wispID string, filter DepListFilter) ([]*types.IssueWithDependencyMetadata, error) {
return u.listWithMetadata(ctx, wispID, filter, true)
}
func (u *dependencyUseCaseImpl) IterWispWithIssueMetadata(ctx context.Context, wispID string, filter DepListFilter) (storage.Iter[types.IssueWithDependencyMetadata], error) {
return u.iterWithMetadata(ctx, wispID, filter, true)
}View on GitHub (pinned to 71377f2769)
Solutions
- Inspect the wrapped error; TableNotExist is intentionally filtered out so this is a genuine failure
- Verify wisps table schema matches the expected version
- Check DB connectivity and retry
- If the deployment should not have wisps, investigate why the table exists but fails
Defensive patterns
Strategy: try-catch
Validate before calling
// no pre-call validation available; ensure the deployment has a consistent wisps table state
Try / catch
out, err := u.GetForIssueIDs(ctx, ids)
if err != nil {
// TableNotExist is already tolerated; anything here is a real failure
log.Errorf("wisp dep lookup failed: %v", err)
return err
} Prevention
- Do not create/copy a wisps table manually with mismatched schema
- Keep beads and its migrations version-aligned
- If wisps are unused, investigate unexpected wisps-table errors rather than ignoring them
- Monitor DB health; this error usually means connectivity, not missing data
When it happens
Trigger: Calling GetForIssueIDs where the wisps-table ListByIssueIDs returns an error other than TableNotExist (e.g. connection failure, SQL error).
Common situations: Wisp table exists but is corrupt or locked; database connectivity problems; unexpected schema drift between versions where the table exists but columns differ.
Related errors
- reparent: remove old parent %s: %w
- reparent: add new parent %s: %w
- GetForIssueIDs: %w
- list dep metadata: %w
- iter dep metadata: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/8d86c7c3c7dea092.
Report an issue: GitHub.