more robust retrying against external apis