wtfutil/wtf · warning
no links
Error message
no links
What it means
GetLinks successfully parses a Reddit listing JSON but finds zero children in data.children, meaning the subreddit listing is empty. It treats an empty feed as an error because the widget has nothing to render.
Source
Thrown at modules/subreddit/api.go:50
resp, err := client.Do(request)
if err != nil {
return nil, err
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode > 299 {
return nil, fmt.Errorf("%s", resp.Status)
}
var m RedditDocument
err = utils.ParseJSON(&m, resp.Body)
if err != nil {
return nil, err
}
if len(m.Data.Children) == 0 {
return nil, fmt.Errorf("no links")
}
var links []Link
for _, l := range m.Data.Children {
links = append(links, l.Data)
}
return links, nil
}
View on GitHub (pinned to bb838c1ccb)
Solutions
- Verify the subreddit actually has posts by visiting reddit.com/r/<name>
- Pick a more active subreddit in the widget config
- Log in / use authenticated API access if Reddit hides listings from anonymous requests
- Treat this as expected in callers for low-traffic subreddits
Defensive patterns
Strategy: fallback
Validate before calling
// fetch the listing and check before use
if doc.Data != nil && len(doc.Data.Children) == 0 { return nil, errEmptyFeed } Try / catch
links, err := GetLinks(subreddit)
if err != nil {
if err.Error() == "no links" { renderEmptyState(); return }
return err
} Prevention
- Choose active subreddits with regular posts
- Render an empty state instead of failing the widget on empty feeds
- Check reddit.com/r/<name> returns posts for anonymous visitors
- Account for new subreddits starting with zero children
When it happens
Trigger: HTTP 200 with valid listing JSON whose data.children array is empty — e.g. a brand-new subreddit with no posts, a heavily filtered/quarantined subreddit, or a subreddit returning an empty listing to unauthenticated requests.
Common situations: Freshly created subreddits with no submissions; subreddits where all posts were removed; spammed/hidden listings; rare cases of Reddit returning empty payloads to anonymous users.
Related errors
- no table structure returned from query
- yfinance: no results for symbol %q
- %s
- invalid app index selected
- cannot expand user-specific home dir
AI-assisted analysis of wtfutil/wtf@bb838c1ccb (2026-09-03).
Data as JSON: /api/errors/017106722883151b.
Report an issue: GitHub.