fix(wiki): treat an empty wiki's 404 as an empty page list #13
No reviewers
Labels
No labels
area/dsh
area/forgejo
experiment
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-gitea!13
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/9-wiki-empty-list"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
gitea_wiki {action:"list"}treats an enabled-but-empty wiki as an error:Forgejo's
GET /repos/{owner}/{repo}/wiki/pagesanswers 404 when the wiki has no pages (there is no empty list to return).listWikiPages()now maps only that 404 to{ ok: true, status: 404, data: [] }.Auth (
401), permission (403) and server (5xx) failures still surface as errors — the mapping is not a blanket swallow.Verification
test/wiki.test.mjs: mocked-fetch coverage for 404 → empty success, 200 → pages unchanged, 401/403/500 → still errors.npm run checkpasses (49 tests, leak scan clean).Acceptance (from #9)
fetch404:gitea_wiki listresolvesok: truewith an empty list and no error text.ml-lab/tarditsafter merge/reload (tracked in #9).pvlb-infra/t14-deepsstill lists all pages.Closes #9.