Catches exceptions and retries each request a limited times
