a function for doing the common retry logic with the effect-based requester