After the page is loaded, it seems that the getGIst function is triggering again resulting in an error like:
{"error":{"message":"Unexpected token : in JSON at position 3","stack":"SyntaxError: Unexpected token : in JSON at position 3\n at JSON.parse ()\n at Request._callback (/Users/kerri/projects/badgebot-web/app/Controllers/assertion.js:94:25)\n at Request.self.callback (/Users/kerri/projects/badgebot-web/node_modules/request/main.js:122:22)\n at Request.emit (events.js:127:13)\n at Request. (/Users/kerri/projects/badgebot-web/node_modules/request/main.js:655:16)\n at Request.emit (events.js:132:15)\n at IncomingMessage. (/Users/kerri/projects/badgebot-web/node_modules/request/main.js:617:14)\n at IncomingMessage.emit (events.js:132:15)\n at endReadableNT (_stream_readable.js:1101:12)\n
which is the result of the gist body being "404: not found".
The gist is found successfully the first time it runs.
After the page is loaded, it seems that the getGIst function is triggering again resulting in an error like:
{"error":{"message":"Unexpected token : in JSON at position 3","stack":"SyntaxError: Unexpected token : in JSON at position 3\n at JSON.parse ()\n at Request._callback (/Users/kerri/projects/badgebot-web/app/Controllers/assertion.js:94:25)\n at Request.self.callback (/Users/kerri/projects/badgebot-web/node_modules/request/main.js:122:22)\n at Request.emit (events.js:127:13)\n at Request. (/Users/kerri/projects/badgebot-web/node_modules/request/main.js:655:16)\n at Request.emit (events.js:132:15)\n at IncomingMessage. (/Users/kerri/projects/badgebot-web/node_modules/request/main.js:617:14)\n at IncomingMessage.emit (events.js:132:15)\n at endReadableNT (_stream_readable.js:1101:12)\n
which is the result of the gist body being "404: not found".
The gist is found successfully the first time it runs.