catch and log

This commit is contained in:
Daniel Lugo 2020-02-27 13:25:07 -04:00
parent 0ce7c92020
commit 28a473740c

View file

@ -68,6 +68,7 @@ const pubToLastUpdate = {}
*/ */
const onOpenForPubFeedPair = ([pub, feed]) => const onOpenForPubFeedPair = ([pub, feed]) =>
debounce(async data => { debounce(async data => {
try {
// did invalidate // did invalidate
if (pubToLastIncoming[pub] !== feed) { if (pubToLastIncoming[pub] !== feed) {
return return
@ -160,6 +161,10 @@ const onOpenForPubFeedPair = ([pub, feed]) =>
...getPubToFeed(), ...getPubToFeed(),
[pub]: decryptedMsgs [pub]: decryptedMsgs
}) })
} catch (err) {
logger.warn(`error inside pub to pk-feed pair: ${pub} -- ${feed}`)
logger.error(err)
}
}, 750) }, 750)
const react = () => { const react = () => {