reorder the code in a more meaningful way
increase the delay between retries

It turns out the origin server will block the client temporarily
if it hits too frequently, given 403 errors.

Some testers run the tests in parallel, which trigger this behaviour.

The test scripts will try harder, with doubled wait time between retries.
do not retry the query when the server gives a 5xx status
Changes for version 0.22