RogerioBlanco / PixelCanvasBot

A bot to pixelcanvas.io
63 stars 24 forks source link

[Suggestion] Add retry for failed/errored requests #121

Open rdragonz opened 3 years ago

rdragonz commented 3 years ago

Suggestion:

Add a retry for requests that fail or return an error

Expected behavior with proposed changes

When a request to the website fails, the program retries the request a few times before throwing an exception and terminating the program

Why is this beneficial?

Sometimes requests can fail with mysterious errors, but restarting the program fixes the issue. I leave this program running in the background in order to continue doing it's desired task and sometimes walk away to do other things and can't keep babysitting it. If the program would retry before throwing an exception, this needless restarting could be solved.