title: catch Http error other than resolve/reject promise
body: <p>All,</p>
  
  <p>i am calling an API(back end) using promises in angular 8 typescript.
  need to be able to get the error response back, how ever when i reject the error to get the response/error, I get "OK"(msg = "OK"), but in console i have the 500 error with the actual response.
  see code and the response in network tab below.:</p>
  
  <pre><code>getAllItem(id: number) {
  let promise = new Promise((resolve, reject) =&gt; {
    this.http.post&lt;any&gt;(environment.apiEndPoint,
      { "Method": "myMethod"},
      Helper.getHeader()).toPromise().then((res: any) =&gt; {
        resolve(res);
      },
        msg =&gt; { reject(msg); });
  });
  return promise;
  </code></pre>
  
  <p>}</p>
  
  <p>this is my actual response in network tab:</p>
  
  <pre><code>{"Success": false, "ErrorCode": "SYSTEM909", "Data": {}}
  </code></pre>
  
  <p>in the network tab i get below
  Status Code: 500</p>
  
  <p>Thanks</p>