From 4599ace24f597b33cd6741727297f01fda6c7ac9 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 11 Sep 2019 18:40:07 -0300 Subject: [PATCH] Remove redundant error logging The `_fetchAll` function is expected to return values, so catching errors and logging them only results in an additional error at the place where `_fetchAll` is called. It's better instead to let the error get thrown as normal. In this particular case `_fetchAll` is only called in once place. The error is still correctly caught and logged (in the `_update` function) --- app/scripts/controllers/incoming-transactions.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/scripts/controllers/incoming-transactions.js b/app/scripts/controllers/incoming-transactions.js index c268073acab5..d3485a7ddcec 100644 --- a/app/scripts/controllers/incoming-transactions.js +++ b/app/scripts/controllers/incoming-transactions.js @@ -171,12 +171,8 @@ class IncomingTransactionsController { } async _fetchAll (address, fromBlock, networkType) { - try { - const fetchedTxResponse = await this._fetchTxs(address, fromBlock, networkType) - return this._processTxFetchResponse(fetchedTxResponse) - } catch (err) { - log.error(err) - } + const fetchedTxResponse = await this._fetchTxs(address, fromBlock, networkType) + return this._processTxFetchResponse(fetchedTxResponse) } async _fetchTxs (address, fromBlock, networkType) {