Adding retries when http request fails