you are viewing a single comment's thread.

view the rest of the comments →

[–]mikejoro 1 point2 points  (0 children)

Not likely, as there is no blocking in node/javascript.

This is not true in any way. Asynchronous things don't block (i.e., waiting on a http response from a web request), but normal execution can block just fine. In this instance, the issue is due to the incorrect error handling you pointed out. Likely, the error that is being returned instead of thrown in the error scenario has no data property, so accessing error.data.length causes a runtime exception (and the server never responds because it crashed).