title: Error handling on request piping
body: <p>I wrote simple proxy on nodejs and it looks like</p>
  
  <pre><code>var request = require( 'request' );
  app.all( '/proxy/*', function( req, res ){
      req.pipe( request({
          url: config.backendUrl + req.params[0],
          qs: req.query,
          method: req.method
      })).pipe( res );
  });
  </code></pre>
  
  <p>It works fine if remote host is available, but if remote host is unavailable the whole node server crashes with unhandled exception</p>
  
  <pre><code>stream.js:94                                               
        throw er; // Unhandled stream error in pipe.         
              ^                                              
  Error: connect ECONNREFUSED                                
      at errnoException (net.js:901:11)                      
      at Object.afterConnect [as oncomplete] (net.js:892:19) 
  </code></pre>
  
  <p>How can I handle such errors?</p>