LearnBoost/knox — Issue #41: Assertion Error happens eventually and crashes the server
Author: ThiagoMiranda
Created: 2011-10-18 21:08:10+00:00
State: open

Hi.
Thanks for the module, it helped me a lot in a feature that I'm developing in my product.
A thing that've noticing is that sometimes when the response.statusCode isn't 200 the nodeJS crashes at an exception:

assert.js:93

throw new assert.AssertionError({

^

AssertionError: true == false
at IncomingMessage. (http.js:1341:9)
at IncomingMessage.emit (events.js:61:17)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.ondata (http.js:1231:22)
at Socket._onReadable (net.js:683:27)
at IOWatcher.onReadable [as callback] (net.js:177:10)

Does anyone knows why this happens? Is there a way to catch that exception avoiding the server to crash?

Thanks a lot

Thiago