Error: unexpected end of JSON input

Hi all, can anyone tell me what caused this error? How to solve it?

It just means that the response body probably wasn’t a valid JSON document. Add console.log(res.body) between lines 99 and 100 and you’ll probably see what the problem is. It’s apparent that the console.log() at line 106 is never reached because of the exception in check().