Skip to content

Commit a9869cf

Browse files
Report error when fetching ListGroupRights fails.
1 parent c3f6809 commit a9869cf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

highlight.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ async function getUsers({groups, overrides}: Config) {
8080
}
8181
const response = await fetch(`https://dev.fandom.com/wiki/Special:ListGlobalUsers?${new URLSearchParams(searchParams)}`);
8282
const html = await response.text();
83+
console.log(response.status);
84+
console.log(html);
85+
if (!response.ok) {
86+
throw new Error(`failed to fetch user group list: status code ${response.status}, response: ${html}`);
87+
}
8388
const tree = parser.parse(html);
8489
for (const node of tree.querySelectorAll('.list-global-users-members > li')) {
8590
const name = node.querySelector('bdi')?.innerText;

0 commit comments

Comments
 (0)