-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'body' of undefined #5
Comments
You can get this api to work again by editting node_modules/bg-hive-api/Connection.js so that line 47 has a comma on the end, and by adding the strictSSL line. It will need more work to support the new v6 series API which BG are now using. You can investigate the current BG API at https://api.prod.bgchprod.info:8443/api/docs I'm guessing that the URL used in this module will at some point get turned off ... I hope to contribute more to this module if I manage to find the time! |
strictSSL set to false as suggested by nosdod here: aklambeth#5 (comment)
Using workaround has stopped working since the 4th Jan, gives the same error message as before - URL now turned off? |
The URL has changed from: |
The new signed v5 api appears to be on https://api-prod.bgchprod.info/api. The v6 api is on https://api-prod.bgchprod.info:443/omnia. Side note:- Now the url has a valid signed cert the "strictSSL" option no longer needs to be set to false. |
Hi,
I've been using the API for months without issue, however, around the 9th of September it has failed with the following error:
root@pi20:/home/username# /home/username/node/bin/node /home/username/node/bin/node_modules/bg-hive-api/test.js
/home/username/node/bin/node_modules/bg-hive-api/index.js:108
var errorReason = JSON.parse(response.body);
^
TypeError: Cannot read property 'body' of undefined
at Object.callback (/home/username/node/bin/node_modules/bg-hive-api/index.js:108:54)
at next (/home/username/node/bin/node_modules/bg-hive-api/node_modules/async/lib/async.js:801:43)
at /home/username/node/bin/node_modules/bg-hive-api/node_modules/async/lib/async.js:32:16
at Request._callback (/home/username/node/bin/node_modules/bg-hive-api/Connection.js:63:9)
at self.callback (/home/username/node/bin/node_modules/bg-hive-api/node_modules/request/request.js:373:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Request.onRequestError (/home/username/node/bin/node_modules/bg-hive-api/node_modules/request/request.js:971:8)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
Thanks, Ash
The text was updated successfully, but these errors were encountered: