1
0
mirror of https://github.com/bitwarden/web synced 2025-12-14 07:13:23 +00:00

error handling for no payment method

This commit is contained in:
Kyle Spearrin
2017-07-28 16:44:36 -04:00
parent 96b8467859
commit f944910975
2 changed files with 14 additions and 1 deletions

View File

@@ -31,7 +31,12 @@ angular
}, function failure(reason) {
$timeout(function () {
form.$loading = false;
validationService.addErrors(form, reason);
if (typeof reason === 'string') {
validationService.addError(form, null, reason, true);
}
else {
validationService.addErrors(form, reason);
}
scope.$broadcast('show-errors-check-validity');
$('html, body').animate({ scrollTop: 0 }, 200);
});