Fix retry logic for batch import errors