mmalecki / dmkbot

Simple bot for #node.js
MIT License
8 stars 2 forks source link

Bot crashed with github #3

Open thejhh opened 13 years ago

thejhh commented 13 years ago

I was running the bot with github plugin enabled when this SyntaxError crashed it:

Connecting to IRC server irc.kapsi.fi with nick icebot
Registered to server

undefined:1

^^ SyntaxError: Unexpected token ILLEGAL at Object.parse (native) at IncomingMessage. (/home/users/jhh/git/dmkbot/lib/modules/github.js:33:21) at IncomingMessage.emit (events.js:81:20) at HTTPParser.onMessageComplete (http.js:133:23) at CleartextStream.ondata (http.js:1228:22) at CleartextStream._push (tls.js:303:27) at SecurePair.cycle (tls.js:577:20) at EncryptedStream.write (tls.js:96:13) at Socket.ondata (stream.js:36:26) at Socket.emit (events.js:64:17)

mmalecki commented 13 years ago

Are you sure correct data is returned from GitHub? This line points to JSON.parse.

Try curling https://api.github.com/repos/joyent/node/issues