bulk API retry logic