show error when send email fails

This commit is contained in:
Ivan Socolsky 2014-12-17 17:16:05 -03:00
commit be6811cb4a
5 changed files with 9 additions and 7 deletions

View file

@ -322,12 +322,9 @@ Identity.prototype.store = function(opts, cb) {
var storeFunction = opts.failIfExists ? self.storage.createItem : self.storage.setItem;
storeFunction.call(self.storage, this.getId(), this.toObj(), function(err) {
if (err) {
return cb(err);
}
if (err) return cb(err);
if (opts.noWallets)
return cb();
if (opts.noWallets) return cb();
async.each(_.values(self.wallets), function(wallet, in_cb) {
self.storeWallet(wallet, in_cb);