ts-retry
ts-retry copied to clipboard
retryUntilDefined retries also on error
retryUntilDefined and retryAsyncUntilDefined seem to retry also on error. Is there any way to make them retry only when undefined or null is returned but immediately bail out on any error?
Currently stopping on error is not a feature provided by the API. You may achieve the desire bahvoir by providing an onError function in the options. If the onError throws an error, this should prevent retry. I'll be thinking to a proper way to do this for a further release.