Tencent/WeKnora · error
load index page: %w
Error message
load index page: %w
What it means
Repository error in wikiPageService.GetIndexView: loading the wiki's index/landing page — the anchor the index view is built around — failed. The %w preserves the underlying store error; it fires when the index page lookup itself errors, before group pagination and cursor handling run.
Source
Thrown at internal/application/service/wiki_page.go:475
//
// `pageTypes` narrows which groups to include; empty = all content types.
// `limit` is the per-group window size (defaults to 50, capped at 200).
// `cursor` is an opaque offset string; currently we use the stringified
// offset so clients can resume where they left off. Because different
// page_types paginate independently, `cursor` applies uniformly to every
// group — if the caller wants per-group cursors it should request one
// type at a time via `pageTypes`. That simplifies the wire format and
// matches the frontend's tabbed UX.
func (s *wikiPageService) GetIndexView(
ctx context.Context,
kbID string,
pageTypes []string,
limit int,
cursor string,
) (*types.WikiIndexResponse, error) {
indexPage, err := s.GetIndex(ctx, kbID)
if err != nil {
return nil, fmt.Errorf("load index page: %w", err)
}
if limit <= 0 {
limit = 50
}
if limit > 200 {
limit = 200
}
offset := 0
if cursor != "" {
v, parseErr := strconv.Atoi(cursor)
if parseErr != nil || v < 0 {
return nil, fmt.Errorf("invalid cursor %q", cursor)
}
offset = v
}
// Default to every known content type when the caller passes noView on GitHub (pinned to 988cbb0330)
Solutions
- Verify the index page exists for the KB
- Check repo/DB availability via the wrapped error
- Retry the index view request
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at internal/application/service/wiki_page.go:475 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/5cdcf9cff51079f3.
Report an issue: GitHub.