Skip to content

Commit

Permalink
Remove redundant error logging (#7158)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Gudahtt authored Sep 12, 2019
1 parent 34440d6 commit a00493f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/scripts/controllers/incoming-transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a00493f

Please sign in to comment.