title: how can I track down the actual source of an EPIPE write error?
body: <p>I'm sending a fairly large message to a RabbitMQ queue. I suspect the message may be too large but the error that I'm getting seems to have nothing to do with that. I'm using Rabbit.js. Is this an example of a library failing to catch an error? How can I figure out where the error is actually happening? </p>
  
  <p>The relevant block of code in net.js: </p>
  
  <pre><code>if (status &lt; 0) {
      var ex = exceptionWithHostPort(status, 'write', req.address, req.port);
      debug('write failure', ex);
      self._destroy(ex, req.cb);
      return;
    }
  </code></pre>
  
  <p><code>status</code> is equal to <code>-32</code>. That's... not much help. <code>req.address</code> and <code>req.port</code> are both undefined.   </p>
  
  <pre><code>events.js:141
        throw er; // Unhandled 'error' event
        ^
  
  Error: write EPIPE
      at Object.exports._errnoException (util.js:870:11)
      at exports._exceptionWithHostPort (util.js:893:20)
      at WriteWrap.afterWrite (net.js:763:14)
  </code></pre>
  
  <p>If this is a problem with the Rabbit.js library I'd like to be able to give the author more info than that stack trace (which seems like it wouldn't help much at all). </p>