handle other/default cases

This commit is contained in:
Javier 2016-12-16 11:20:56 -03:00
parent 09ba421eea
commit c6faadd53f
1 changed files with 4 additions and 2 deletions

View File

@ -141,14 +141,16 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
twoStep: true
}, function(err, ret) {
if (err) {
if (err instanceof errors.NOT_AUTHORIZED) {
if (err instanceof errors.NOT_AUTHORIZED)
return cb('WALLET_NOT_REGISTERED');
}
if (err instanceof errors.CONNECTION_ERROR)
return cb('CONNECTION_ERROR');
if (err instanceof errors.NOT_FOUND)
return cb('NOT_FOUND');
return cb(err);
}
return cb(null, ret);
});