Merge pull request #5872 from matiu/bug/gift-card-err
better gift-card-err
This commit is contained in:
commit
62cc46e455
1 changed files with 7 additions and 1 deletions
|
|
@ -145,7 +145,13 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
|
||||||
amazonService.createBitPayInvoice(dataSrc, function(err, dataInvoice) {
|
amazonService.createBitPayInvoice(dataSrc, function(err, dataInvoice) {
|
||||||
if (err) {
|
if (err) {
|
||||||
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
|
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
|
||||||
showError('Error creating BitPay invoice', err);
|
|
||||||
|
if (err && err.message && err.message.match(/suspended/i)) {
|
||||||
|
showError('Service not available', 'Amazon Gift Card Service is not available at this moment. Please try back later.');
|
||||||
|
} else {
|
||||||
|
showError('Could not access Gift Card Service', err);
|
||||||
|
};
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue