title: Type 'Observable<HttpEvent<>>' is not assignable to type 'Observable<>'
body: <p>I have this code snippet: </p>
  
  <pre><code>SubmitTransaction(transNumber: string, transactionRequest: ITransactionRequestObj): Observable&lt;TransactionResponse&gt; {
      this.body =  JSON.stringify(transactionRequest);
      this.headers = new HttpHeaders().set('Content-Type', 'application/json');
      this.headers.append('Accept', 'application/json');
      this.options = new RequestOptions({headers: this.headers});
      return this.http.post&lt;TransactionResponse&gt;(this.baseUrl + '/transactions/' + transNumber + '/new',  this.body, this.options)
     .pipe(catchError((e) =&gt; this.errorHandler(e)));
    }
  </code></pre>
  
  <p>where all I did was upgrade my project from Angular 5 to Angular 6 and change <code>.catch((e) =&gt; this.errorHandler(e));</code> to  <code>.pipe(catchError((e) =&gt; this.errorHandler(e)));</code> . However, I am getting the following TypeScript error for this particular method. </p>
  
  <p>Error: </p>
  
  <pre><code>[ts]
  Type 'Observable&lt;HttpEvent&lt;TransactionResponse&gt;&gt;' is not assignable to type 'Observable&lt;TransactionResponse&gt;'.
    Type 'HttpEvent&lt;TransactionResponse&gt;' is not assignable to type 'TransactionResponse'.
      Type 'HttpSentEvent' is not assignable to type 'TransactionResponse'.
        Property '_transactionNumber' is missing in type 'HttpSentEvent'.
  </code></pre>
  
  <p>I'm not sure what I should do in this scenario. The code snippet above was working in Angular 5. What do I need to do to fix it for Angular 6? </p>
  
  <p>EDIT: </p>
  
  <pre><code>errorHandler(error: HttpErrorResponse) {
        return throwError(error.message || 'Server Error');
    }
  </code></pre>
  
  <p>I have noticed if I don't use the HttpHeaders, it works: </p>
  
  <pre><code>SubmitTransaction(transNumber: string, transactionRequest: ITransactionRequestObj): Observable&lt;TransactionResponse&gt; {
      this.body =  JSON.stringify(transactionRequest);
      this.headers = new HttpHeaders().set('Content-Type', 'application/json');
      this.headers.append('Accept', 'application/json');
      this.options = new RequestOptions({headers: this.headers});
      return this.http.post&lt;TransactionResponse&gt;(this.baseUrl + '/transactions/' + transNumber + '/new',  transactionRequest)
      .pipe(catchError((e) =&gt; this.errorHandler(e)));
    }
  </code></pre>
  
  <p>However, I might need to use the HttpHeaders... what is the workaround in this scenario? </p>