node-owlintuition icon indicating copy to clipboard operation
node-owlintuition copied to clipboard

Crashes when receiving non XML packet

Open hutchy2570 opened this issue 7 years ago • 0 comments

Firstly, thanks for this library, it's saved me from having to mess around with the sockets and listeners myself :)

While testing I was set up correctly, I sent a packet with the text abc 123 and this caused a crash due to an unhandled error thrown from xml2json.

Error: There are errors in your xml file: syntax error
    at Object.module.exports [as toJson] (/Users/mhutchinson/dev/other/solar/node_modules/xml2json/lib/xml2json.js:173:15)
    at Socket.<anonymous> (/Users/mhutchinson/dev/other/solar/node_modules/owlintuition/owl.js:154:18)
    at Socket.emit (events.js:182:13)
    at UDP.onMessage (dgram.js:628:8)

https://github.com/aallan/node-owlintuition/blob/master/owl.js#L150

hutchy2570 avatar Oct 23 '18 22:10 hutchy2570