title: Angular2 map -> subscribe data type error ( Property 'length' does not exist on type 'ErrorObservable'.)
body: <p>I have difficulties in web programming.</p>
  <p>I want to use HTTP communication, call 'map' and pass the array data.</p>
  <pre><code>makeTables(json:string) {
       let arr:Array&lt;any&gt; = [];
       ...
  
       return arr;
  }
  
  query(spName: string, objParam: Array&lt;any&gt;) {
       return this.http.post(this.url, this.data)
              .map(x =&gt; this.makeTables(x.json()));
  };
  
  login(username: string, password: string) {
        let ret = this.mysql.query(&quot;sp_admin_login&quot;, [username, password]);
              
        ret.subscribe( x =&gt; {
             // ERROR !!!!!!!!!
             console.log(x.length);
  
             if(1 ==1 /*user &amp;&amp; user.token*/) {
                   localStorage.setItem(&quot;user&quot;, &quot;user&quot;);
             } else {
             // Q2
                   // ret.mockError(new Error('Username or password is incorrect'));
             }
        });
          
           return ret;
      }
  </code></pre>
  <p>// ERROR !!!!!!!!</p>
  <p>The error appears on accessing x.length</p>
  <p>Error Message is</p>
  <blockquote>
  <p>/admin/src/app/_authentication/authentication.service.ts (17,27):</p>
  <p>Property 'length' does not exist on type 'any[] | ErrorObservable'.<br />
  Property 'length' does not exist on type 'ErrorObservable'.</p>
  </blockquote>
  <hr />
  <p>And a second question:</p>
  <p>How can I call the error method ?
  ( // Q2 )</p>
  <pre><code>ret.mockError(new Error('Username or password is incorrect'));
  </code></pre>