title: handling error from Angular httpClient retryWhen block
body: <p>I have a pretty simple http call happening.  Upon error I want the request to retry 3 times with a three second delay between retries. I have worked out a solution that is close:</p>
  
  <pre><code>return this.http.put&lt;string&gt;(URL,
                 value).retryWhen(err =&gt; {
                      return err
                      .delay(3000)
                      .take(3)
                      .concat(Observable.throw("error occurred"));
                  })
                 .catch(err =&gt; this.handleHttpError(err)) ;
  </code></pre>
  
  <p>The client retries three times like I expect.  However, I don't know how to throw the final error in such a way that my error handler (which normally expects an HttpResponse argument) can process the error.</p>
  
  <p>Once I have taken(3) how can I get the final error, and convert it to an HttpResponse to send to my handler?  Or am I looking at this the wrong way?</p>
  
  <p>I need to know, at the end of the day, the HttpResponse that accompanied the error(s).  When I throw the err from the retryWhen at the concat function that doesn't seem to accomplish it.</p>
  
  <p>I am betting this is a pretty common thing to do, but being newer to Angular 5 and react I think I am just missing the boat.</p>