title: Utilizing rxjs repeatWhen in http request pipe in order to repeat the request if desired response is not returned
body: <p>I'm trying to use below simplified version of my http request pipeline to ensure that if my response  does not have the required data in res.myCondition to utlize repeatWhen and make another call, but I'm clearly not utilizing repeatWhen the way it's meant to be. (angular 8/ rxjs 6.5)</p>
  <p>Intention is for the first call to come into the map, where I check the returned data, if the data is there I'll return it to the subscriber back in my component, but if myCondition is missing from res I'd like to repeat the api call a pre-determined number of times stored in reties.</p>
  <p>any thoughts on where I'm going wrong with my repeatWhen implementation?</p>
  <p>method1:</p>
  <pre><code>return this.http.get()
     .pipe(map(res =&gt; res.myCondition ? res : null),
          repeatWhen(res =&gt; retries-- &gt; 0 ? of(res) : res), 
          catchError((error: HttpErrorResponse) =&gt; (error))
  </code></pre>