title: What type of error object is retuned from a http call if statusCode is not 200?
body: <p>I am making http calls in meteor using the npm 'request' package.</p>
  
  <p>I would like to know what type of error object is created when a response.statusCode is not equal to 200? Is this handled by the javascript engine and considered a <em>runtime error</em>?</p>
  
  <p>Or if the statusCode is not equal to 200 is determined by the service provider whether they will create an error object or not?</p>
  
  <p>If the latter, do I create a 'manual error',  <code>new Error('throwing my own error for the catch block to handle')</code></p>
  
  <pre><code>var request = function() {
  // HTTP call to server
    },  
    function (error, response, body) {    
    if (!error &amp;&amp; response.statusCode === 200) {
      // processed and created data object
        return data
    }
    else {
       return (error) ; // How can I ensure the catch(e) block in the try/catch method will catch the error with an addition of my own 'message'. 
    }
  })
  };
  
  try {
      request()
  }
  catch(e) {
    console.log(e)
  }
  </code></pre>
  
  <p>For my scenario, I would like to ensure the catch(e) block will grab this error and I would like to add my own message including the stack trace.</p>