title: Problem with Observable after update app to Angular 7 and RxJS 6.3.3
body: <p>I updated my app to Angular 7 and RxJS 6.3.3 and I've got a problems during making changes into my code. I really need help with that, because I can't to find solution into google or stack overflow.</p>
  
  <p>My imports:</p>
  
  <pre><code>import { Observable, of } from 'rxjs';
  import { map, catchError } from 'rxjs/operators';
  import { Injectable, Inject, Optional, InjectionToken } from '@angular/core';
  import { Headers, ResponseContentType, Response } from '@angular/http';
  import { HttpClient } from '@angular/common/http';
  </code></pre>
  
  <p>Here is code of my <code>test</code> function:</p>
  
  <pre><code>protected test(response: Response): Observable&lt;MyResponseClass | null&gt; {
      const status = response.status;
  
      if (status === 200) {
         let result200: any = null;
         ... some code ...
         return of&lt;MyResponseClass | null&gt;(result200);
      }
      return of&lt;MyResponseClass | null&gt;(&lt;any&gt;null);
  }
  </code></pre>
  
  <p>Here is <code>MyResponseClass</code> pseudocode:</p>
  
  <pre><code>class MyResponseClass implements IMyResponseClass {
      property1?: string | undefined;
      property2?: string | undefined;
      property3: boolean;
  
      ...
  }
  </code></pre>
  
  <p><code>IMyResponseClass</code> pseudocode:</p>
  
  <pre><code>interface IMyResponseClass {
      property1?: string | undefined;
      property2?: string | undefined;
      property3: boolean;
  }
  </code></pre>
  
  <p>Here is my code of my <code>get()</code> function:</p>
  
  <pre><code>get(): Observable&lt;MyResponseClass | null&gt; {
      let url_ = some_url;
  
      let options_: any = {
          method: "get",
          headers: new Headers({
              "Content-Type": "application/json",
              "Accept": "application/json"
          })
      };
  
      return this.http.request(url_, options_).pipe(
          map((response_: any) =&gt; { return this.test(response_); })),
          catchError((err: any, caught: Observable&lt;MyResponseClass | null&gt;) =&gt; {
              if (caught instanceof Response) {
                  try {
                      return this.test(&lt;any&gt;caught);
                  } catch (e) {
                      return &lt;MyResponseClass | null&gt;&lt;any&gt;Observable.throw(e);
                  }
              } else
              return &lt;MyResponseClass | null&gt;&lt;any&gt;Observable.throw(caught);
          })
      );
  }
  </code></pre>
  
  <p>I'm still getting this error:</p>
  
  <p><a href="https://i.stack.imgur.com/oL3Fj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oL3Fj.jpg" alt="enter image description here"></a></p>
  
  <p>Here is a text version of this error:</p>
  
  <pre><code>Argument of type '(err: any, caught: Observable&lt;MyResponseClass&gt;) =&gt; MyResponseClass | Observable&lt;MyResponseClass&gt;' is not assignable to parameter of type '(err: any, caught: Observable&lt;MyResponseClass&gt;) =&gt; ObservableInput&lt;MyResponseClass&gt;'.
    Type 'MyResponseClass | Observable&lt;MyResponseClass&gt;' is not assignable to type 'ObservableInput&lt;MyResponseClass&gt;'.
      Type 'MyResponseClass' is not assignable to type 'ObservableInput&lt;MyResponseClass&gt;'.
        Type 'MyResponseClass' is not assignable to type 'Iterable&lt;MyResponseClass&gt;'.
          Property '[Symbol.iterator]' is missing in type 'MyResponseClass'.
  </code></pre>
  
  <p>What I'm doing wrong? Will you help me?</p>
  
  <hr>
  
  <p><a href="https://stackoverflow.com/questions/54438854/how-to-change-httpclient-code-after-update-app-to-angular-7">Here</a> is the previous step which I did before that error. Maybe did I something wrong on previous step?</p>
  
  <hr>
  
  <p>I made a changes after read all of comments so now the get() function looks like that:</p>
  
  <pre><code>return this.http.request(url_, options_).pipe(
              map((response_: any) =&gt; { return this.test(response_); }),
              catchError((err: any, caught: Observable&lt;MyResponseClass | null&gt;) =&gt; {
                  if (caught instanceof Response) {
                      try {
                          return this.test(&lt;any&gt;caught);
                      } catch (e) {
                          return throwError(e);
                      }
                  } else
                      return throwError(caught);
              })
          );
  </code></pre>
  
  <p>and I'm still getting error:</p>
  
  <p><a href="https://i.stack.imgur.com/LgPoa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LgPoa.jpg" alt="enter image description here"></a></p>