Type of Change
Summary
Currently when there is an error returning the Promise in both scripts, the current logic doesn't actually log the error, instead it inadvertently passed a function back.
() => {
console.error(err); // eslint-disable-line no-console
}
Details
The reject should just return the error back instead
}).on('error', (err) => {
reject(err);
});
Also, all run blocks should make sure they catch the error, e.g.
function run() {
getTopology()
.then(handleIngestionResponse)
.catch((error) => {
console.error(error); // eslint-disable-line no-console
});
}
Type of Change
Summary
Currently when there is an error returning the
Promisein both scripts, the current logic doesn't actually log the error, instead it inadvertently passed a function back.Details
The
rejectshould just return the error back insteadAlso, all
runblocks should make sure they catch the error, e.g.