Make the retryOnError configurable