Adding retry logic for RestClient calls