better error on recreate2
This commit is contained in:
parent
dc7676e4b0
commit
e844086ac4
1 changed files with 4 additions and 5 deletions
|
|
@ -246,13 +246,13 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
};
|
||||
|
||||
self.handleError = function(err) {
|
||||
$log.debug('ERROR:', err);
|
||||
$log.warn('Client ERROR:', err);
|
||||
if (err.code === 'NOTAUTHORIZED') {
|
||||
$scope.$emit('Local/NotAuthorized');
|
||||
} else if (err.code === 'NOTFOUND') {
|
||||
$scope.$emit('Local/BWSNotFound');
|
||||
} else {
|
||||
$scope.$emit('Local/ClientError', err);
|
||||
$scope.$emit('Local/ClientError', (err.error ? err.error : err);
|
||||
}
|
||||
};
|
||||
self.openWallet = function() {
|
||||
|
|
@ -448,8 +448,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.setOngoingProcess('recreating', false);
|
||||
|
||||
if (err) {
|
||||
$log.error(err);
|
||||
self.clientError('Could not recreate wallet:' + (err.error ? err.error : err));
|
||||
self.handleError(err);
|
||||
$rootScope.$apply();
|
||||
return;
|
||||
}
|
||||
|
|
@ -486,7 +485,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
if (err) {
|
||||
if (self.walletId == walletId)
|
||||
self.setOngoingProcess('scanning', false);
|
||||
self.clientError('Could not scan wallet:' + err);
|
||||
self.handleError(err);
|
||||
$rootScope.$apply();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue