Closed YuAo closed 5 years ago
@YuAo good find, I've never experienced this myself - but you're right, we should definitely add some protection there.
I'll take look into what can be implemented.
Added new tryParseJSON
function and use that as a wrapper for all JSON calls to catch non-JSON response bodies.
Published to NPM as v0.4.2
Closing
Sometime the foobot.io api returns non json strings. It causes the plugin crash.
Maybe we should add some protection around
JSON.parse(...)
?