handle empty bodied response

Sometimes the response body doesn't contain anything, handle this error
condition by retrying, and remaining within the constraints of the
timeout.

I also relocated the timeout logic above the check to 'resp_body' == "ERROR" because it could timeout and resp_body could still be None.