use Error

This commit is contained in:
Matias Alejo Garcia 2015-04-14 15:28:29 -03:00
parent 213451f0d6
commit 629b1551a0
1 changed files with 2 additions and 2 deletions

View File

@ -1121,7 +1121,7 @@ WalletService.prototype.getTxHistory = function(opts, cb) {
},
function(next) {
bc.getTransactions(addressStrs, null, null, function(err, txs) {
if (err) return next('Could not fetch transactions: ' + err);
if (err) return next(new Error('Could not fetch transactions: ' + err));
next(null, self._normalizeTxHistory(txs));
});
@ -1179,7 +1179,7 @@ WalletService.prototype.scan = function(opts, cb) {
if (err) return next(err);
allAddresses.push(addresses);
checkActivity(_.pluck(addresses, 'address'), function(err, thereIsActivity) {
if (err) return next('Could not fetch TX activity:' + err);
if (err) return next(new Error('Could not fetch TX activity:' + err));
activity = thereIsActivity;
next();
});