Skip to content

Commit

Permalink
🔀 Merge pull request #547
Browse files Browse the repository at this point in the history
🦾 catch error like a boss
  • Loading branch information
idinium96 committed Apr 4, 2021
2 parents fc04e47 + 55dc672 commit 936a023
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/classes/Pricelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,13 @@ export default class Pricelist extends EventEmitter {
return;
}

return this.updateOldPrices(old);
return this.updateOldPrices(old)
.then(() => {
log.debug('Done update old prices...');
})
.catch(err => {
log.error('Error on updateOldPrices:', err);
});
})
.catch(err => {
log.debug('❌ Unable to get key prices: ', err);
Expand Down Expand Up @@ -784,7 +790,7 @@ export default class Pricelist extends EventEmitter {
currPrice.enabled = false;
currPrice.group = 'failed-updateOldPrices';
this.failedUpdateOldPrices.push(sku);
log.warn(`updateOldPrices failed for ${sku}`, err);
log.error(`updateOldPrices failed for ${sku}`, err);
pricesChanged = true;
}

Expand Down

0 comments on commit 936a023

Please sign in to comment.