add network error handle

This commit is contained in:
Matias Alejo Garcia 2014-12-02 13:52:17 -03:00
parent b3b0d7903e
commit bc7c21c237
1 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,8 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
copay.logger.warn(err);
if ((err.toString() || '').match('PNOTFOUND')) {
$scope.error = 'Invalid email or password';
} else if ((err.toString() || '').match('Connection')) {
$scope.error = 'Could not connect to Insight Server';
} else {
$scope.error = 'Unknown error';
}