Show Wikipedia category API errors

This commit is contained in:
Edward Betts 2026-08-22 22:12:29 +01:00
parent b7ba24b567
commit 15bbbecacf
2 changed files with 11 additions and 6 deletions

View file

@ -463,10 +463,11 @@ def get_articles_without_images(
if articles_without_images:
error = (
"Wikipedia stopped responding before the whole category could "
"be checked. Showing partial results; please try again."
"be checked. Showing partial results. "
f"Wikipedia API error: {e}"
)
else:
error = "Unable to load articles from Wikipedia. Please try again."
error = f"Unable to load articles. Wikipedia API error: {e}"
break
pages = data.get("query", {}).get("pages", {})