As a Wikisource user, I would like errors associated with large subpage counts to fail gracefully (rather than a white screen), so I clearly understand that an error has occurred and why it has occurred.
Background: At the moment, if you request an export of a work that has a large number of subpages (or pages linked from the ToC), then you'll likely get a white screen and no exported file. For example, https://it.wikisource.org/wiki/Pensieri_di_varia_filosofia_e_di_bella_letteratura has 4,586 subpages and so should not be exported via the web interface. (I think? I mean, what's someone going to do with that epub?)
It should be possible to keep count of how many subpages we're traversing, and fail nicely after we get to some arbitrarily large number. Maybe 50 or 100 or something? I'll have a look at the distribution of subpage counts on various Wikisources. Or could we count the accumulated text size as we add subpages, and bail after some point? It seems that counting subpages would be incorrect for something like a poetical work where each subpage is tiny.
Acceptance Criteria:
- Determine large number of subpages traversed (that would indicate a likely failure) with team
- Implement a failure message in such cases [TBD]