Skip to content

Allow finer control of API errors in client code. #43

@eggpi

Description

@eggpi

Hi! Citation Hunt uses wikitools on its (batch) jobs that process Wikipedia articles, both for fetching the article's text and converting wikicode to HTML.

I was bit by the fact that wikitools will sometimes retry forever upon API errors, which was, interestingly enough, mitigated by another hack I have in place for persisting connections (I'll file a separate issue for that later).

For the purposes of Citation Hunt's batch jobs, I don't particularly care if a single request fails, and I can just as well move on to another one, so it would be nice to have that kind of control. Maybe this could just raise an exception for the client to handle cleanly?

In addition to that, for tools that perform live queries against the API to serve requests, it would be nice to have some control over maxlag errors. wikitools will currently time.sleep when one happens, but if an exception was raised instead, the client might be able to handle it some other way. The sleep could be made optional for compatibility and sane out-of-the-box behavior.

What do you think? I'll be happy to try my hand at this, once we agree on the changes to be made :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions