hardened api retry mechanism.