title: How to handle RxJs timeout complete - Angular HttpClient
body: <p>How to detect an error by timeout operator? I would like to show an alert or something like that just when the server doesn't response.</p>
  
  <p>I have a similiar code in my interceptor:</p>
  
  <pre class="lang-js prettyprint-override"><code>this.http.post('http://localhost:3000/api/core', data)
          .pipe(
              timeout(30000),
              map((response: any) =&gt; { // Success...
                return response;
              }),
              catchError((error) =&gt; { // Error...
                // Timeout over also handled here
                // I want to return an error for timeout
                return throwError(error || 'Timeout Exception');
              }),
              finalize(() =&gt; {
                console.log('Request it is over');
              })
          );
  </code></pre>
  
  
  
  <p>["rxjs": "^6.0.0", "@angular/http": "^6.0.3",]</p>