Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} catch (e) {
didFail = true
}
}
// Run the `finally()` hooks, regardless of sucess or failure.
try {
await this._runHooks(this._hooks.finally)
} catch (e) {
didFail = true
}
if (didFail) {
// Return null, the sole error, or a MultiError.
// https://github.com/joyent/node-verror#verrorerrorfromlisterrors
throw errorFromList(this._failures)
}
}
return;
if (!res.hasOwnProperty('error'))
return;
var error = new Error(res.error.description);
error.type = res.error.type;
error.address = res.error.address;
errors.push(error);
});
}
console.log(s);
cb(verror.errorFromList(errors));
}
q.once('end', function queueDrained() {
if (errors.length > 0) {
callback(mod_verror.errorFromList(errors));
return;
}
/*
* results is now an array of objects in the same order of the
* inputs array, where each object looks like:
*
* {
* "ans": ,
* "elem":
* }
*
* we filter out elements that have a false "ans" value, and
* then map the array to contain only the input elements.
*/
results = results.filter(function filterFalseInputs(input) {