Lisk-sdk: Missing error handler for updateMemAccounts

Created on 30 Jan 2018  路  2Comments  路  Source: LiskHQ/lisk-sdk

https://github.com/LiskHQ/lisk/blob/6cdfef14ebc7afaeb5ae68efcf141e75c7ef2633/modules/loader.js#L487

This block has no .catch handler, which is a reliability issue.

I would have put one there myself, but I don't know what should be the correct error handling logic in that specific case.

bug

Most helpful comment

If something happened wrong in loader, the lisk instance should not start. I believe we should simply return that promise

return library.db.task(updateMemAccounts).then(function (res) { 

As we already having a catch on upper level.
https://github.com/LiskHQ/lisk/blob/78ad7092da105ec0a40aed4f25ab46a67657c3c8/modules/loader.js#L510-L513

@4miners and @karmacoma can confirm this logic.

All 2 comments

If something happened wrong in loader, the lisk instance should not start. I believe we should simply return that promise

return library.db.task(updateMemAccounts).then(function (res) { 

As we already having a catch on upper level.
https://github.com/LiskHQ/lisk/blob/78ad7092da105ec0a40aed4f25ab46a67657c3c8/modules/loader.js#L510-L513

@4miners and @karmacoma can confirm this logic.

~Whoever takes on this task, please make sure PR-1443 has been merged first, as it does a bit of refactoring on that same piece of code :wink:~

UPDATE: That PR has gone in, now! :wink:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yatki picture yatki  路  3Comments

hendrikhofstadt picture hendrikhofstadt  路  4Comments

ManuGowda picture ManuGowda  路  3Comments

ScrewchMcMuffin picture ScrewchMcMuffin  路  3Comments

willclarktech picture willclarktech  路  4Comments