How to throw stream error in custom operator?
Clash Royale CLAN TAG #URR8PPP How to throw stream error in custom operator? I found cstom operator that I want to use. This is an operator that retries http requests. Code is from Stephen Fluin: https://github.com/StephenFluin/http-operators/blob/master/operators/retryExponentialBackoff.operator.ts. Problem is that if after all these reties it does not puts error in stream only completes. I want it to throw an error. How to do it? I think this part should be modified: error(err: any) { if (count <= maxTries) { subscription.add(scheduler.schedule(subscribe, initialWait * Math.pow(2, count++))); } }, Here is whole operator's class /** * Repeats underlying observable on a timer * * @param maxTries The maximum number of attempts to make, or -1 for unlimited * @param initialWait Number of seconds to wait for refresh */ export const retryExponentialBackoff = ( maxTries = -1, initialWait = 1, scheduler: SchedulerLike = asyncScheduler ) =...