Specifically this version of the boilerplate code, which is included in the latest docs:
const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI({
server: 'wss://s1.ripple.com' // Public rippled server hosted by Ripple, Inc.
});
api.on('error', (errorCode, errorMessage) => {
console.log(errorCode + ': ' + errorMessage);
});
api.connect().then(() => {
/* insert code here */
}).then(() => {
return api.disconnect();
}).catch(console.error);
When I try to use this code, the script fails out with the following message:
websocket: undefined
If I remove the api.on("error"...) stanza, the code works as expected. I'm not sure who added that code to the boilerplate, but it seems to have broken it, at least in my experience.
Specifically this version of the boilerplate code, which is included in the latest docs:
When I try to use this code, the script fails out with the following message:
If I remove the api.on("error"...) stanza, the code works as expected. I'm not sure who added that code to the boilerplate, but it seems to have broken it, at least in my experience.