Looks like my node server dies in parseJSON
.
Looked at the logs and the last message was "before parse" and it never printed "after parse". What's strange is that I wrapped JSON.pars with try-catch so I am not sure how it caused the server crashed. Any thoughts?
logger.print("before parse")
parseJSON(data)
logger.print("after parse")
and I have pareJSON catch exception.
function parseJSON(str) {
try {
var result = JSON.parse(str);
return result;
} catch (err) {
return null
}
}