Horace will sometimes try to send messages to users that don't exist, resulting in an error:
(error from production server)
3|horace | 2021-08-26T04:00:24: TypeError: Cannot read property 'send' of undefined
3|horace | 2021-08-26T04:00:24: at Function.sendHighlightDM (/home/ec2-user/horace/eventActions/highlightActions.js:90:9)
3|horace | 2021-08-26T04:00:24: at /home/ec2-user/horace/eventActions/highlightActions.js:68:11
3|horace | 2021-08-26T04:00:24: at tryCatcher (/home/ec2-user/horace/node_modules/bluebird/js/release/util.js:16:23)
3|horace | 2021-08-26T04:00:24: at Promise._settlePromiseFromHandler (/home/ec2-user/horace/node_modules/bluebird/js/release/promise.js:547:31)
3|horace | 2021-08-26T04:00:24: at Promise._settlePromise (/home/ec2-user/horace/node_modules/bluebird/js/release/promise.js:604:18)
3|horace | 2021-08-26T04:00:24: at Promise._settlePromise0 (/home/ec2-user/horace/node_modules/bluebird/js/release/promise.js:649:10)
3|horace | 2021-08-26T04:00:24: at Promise._settlePromises (/home/ec2-user/horace/node_modules/bluebird/js/release/promise.js:729:18)
3|horace | 2021-08-26T04:00:24: at _drainQueueStep (/home/ec2-user/horace/node_modules/bluebird/js/release/async.js:93:12)
3|horace | 2021-08-26T04:00:24: at _drainQueue (/home/ec2-user/horace/node_modules/bluebird/js/release/async.js:86:9)
3|horace | 2021-08-26T04:00:24: at Async._drainQueues (/home/ec2-user/horace/node_modules/bluebird/js/release/async.js:102:5)
3|horace | 2021-08-26T04:00:24: at Immediate.Async.drainQueues (/home/ec2-user/horace/node_modules/bluebird/js/release/async.js:15:14)
3|horace | 2021-08-26T04:00:24: at processImmediate (node:internal/timers:464:21)
This will require further investigation, but my current theory is that
user joins
user adds a highlight, and their ID is stored in the highlight table
user leaves server at some point
highlight is triggered, and Horace tries to send a highlight to the ID in the table, and throws an error because they're no longer in the server and he can't find them
The behavior should be updated such that the error is avoided.
Horace will sometimes try to send messages to users that don't exist, resulting in an error: (error from production server)
This will require further investigation, but my current theory is that
The behavior should be updated such that the error is avoided.