Open denismaier opened 1 year ago
You'll need to catch the HTTPError
exception and handle the retry logic yourself – Pyzotero only retries 429 errors as there isn't really a one-size-fits-all approach to HTTP errors beyond that, IMO.
Ok. thanks. I'll have a look. (Only thing that gives me headaches is that I'm using the everything
retrieving method, and the error occurs after a couple of successfull retrievals, and I don't know how to resume where things went wrong instead of making a completely new start.)
Since the error returns the URL, you could extract the start
parameter (300
) in your example above, and use that as input for whichever top
query you were running – they should all accept e.g. a start=300
param.
Sounds good---but are the successful requests preserved somewhere so I can just add to them?
I'll have to think about it, but I think that's going to be very difficult…
I've started getting "Bad gateway" errors in a script that previously was working flawlessly.
How does pyzotero handle these kinds of errors? Do I need to handle the error catching in my script, or is there a way to let pyzotero retry whatever it was trying to do?