Someguy123/hivefeed-js

hivefeed-js unhandled promise rejection error when witness is disabled

Closed this issue · 0 comments

Hivefeed-js throws this error if your public key is not the same as one configured in hivefeed-js
In my case my witness is currently disabled so the public key for my witness is not the same as configured in hivefeed-js.

(node:5859) UnhandledPromiseRejectionWarning: ReferenceError: reject is not defined
    at delay.then.catch (/home/shmoogle/hivefeed-js/app.js:258:47)
(node:5859) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5859) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Seeing as unhandled promises rejections are deprecated we should handle this error gracefully in some way.