Skip to content

fix: retry transient wiki api failures - #20

Merged
drptbl merged 3 commits into
mainfrom
fix/wiki-api-retries
Oct 30, 2026
Merged

drptbl merged 3 commits into
mainfrom
fix/wiki-api-retries

Conversation

@drptbl

@drptbl drptbl commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Every wiki API request now goes through one helper that retries failed connections, timeouts, bodies cut short, 429, 5xx and a 200 whose body is not JSON. It makes up to 5 attempts with 5, 15, 30 and 60 seconds between them. A data refresh failed on a wiki answer that was not JSON on 2026-10-30.

changes:

  • raised WikiApiError at once on any other status, or on an API error in the body
  • get_images_info stopped retrying a failed request forever
  • the wiki API tests switched to a fake session instead of patching requests.Session.get for the whole run

@drptbl
drptbl merged commit 8880bde into main Oct 30, 2026
5 checks passed
@drptbl
drptbl deleted the fix/wiki-api-retries branch October 30, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant