title: Rxjs catchError not working when subscribe after pipe
body: <p>I have created an observable to consume an API </p>
  
  <p>Observable:-</p>
  
  <pre><code>    return this.http.post('/api/ApplicationUser/Login', loginDetails, httpOptions).pipe(
        map((result: any) =&gt; {
          localStorage.setItem('jwtToken', result.jwtToken);
          localStorage.setItem('refreshToken', result.refreshToken.value)
          localStorage.setItem('UserName', result.userName);
          return result;
        }),
        catchError((err: any) =&gt; {
          //this.userLogout()
          console.log('refresh error')
          return throwError(err);
        })
      );
    }
  </code></pre>
  
  <p>Above code is working fine by results or throwing errors according to my situations when Iam activating with below code:-</p>
  
  <pre><code>    this.loginService.getNewRefreshToken().subscribe(
        (res =&gt; { console.log(res) }),
        (err =&gt; { 
          this.loginService.userLogout()
          console.log(err)
        }),
        () =&gt; { console.log('subscription completed')},
      );
  </code></pre>
  
  <p>But my problem is when Iam activating it with below code its catchError not working but results are fine.
  Why catchError is not working in below case?</p>
  
  <pre><code>    return this.loginService.getNewRefreshToken().pipe(
        map((res: any) =&gt; {
          console.log(res);
        }),
        catchError((err: any) =&gt; {
          console.log(err);
          return throwError(err);
        })
      ).subscribe(
        (res =&gt; {
        console.log(res)
      }),
        (err =&gt; {
          console.log(err)
        })
        )
  </code></pre>