You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently have deployed a bot using this and we have detected that sometimes it exits (2 times in 72h) with the following error in the logs:
/srv/node_modules/matrix-bot-sdk/lib/http.js:89
if (errBody \u0026\u0026 'errcode' in errBody) {
^
TypeError: Cannot use 'in' operator to search for 'errcode' in Bad Gateway
at Request._callback (/srv/node_modules/matrix-bot-sdk/lib/http.js:89:38)
at Request.self.callback (/srv/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
/srv/node_modules/matrix-bot-sdk/lib/http.js:89
if (errBody \u0026\u0026 'errcode' in errBody) {
at Request.\u003canonymous\u003e (/srv/node_modules/request/request.js:1154:10)
at Request.emit (node:events:527:28)
TypeError: Cannot use 'in' operator to search for 'errcode' in Bad Gateway
at IncomingMessage.\u003canonymous\u003e (/srv/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:641:28)
at Request._callback (/srv/node_modules/matrix-bot-sdk/lib/http.js:89:38)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at Request.self.callback (/srv/node_modules/request/request.js:185:22)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at Request.emit (node:events:527:28)
at Request.\u003canonymous\u003e (/srv/node_modules/request/request.js:1154:10)
at Request.emit (node:events:527:28)
at IncomingMessage.\u003canonymous\u003e (/srv/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:641:28)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Haven't been able to detect any message in particular causing that, and the whole stack trace seems to be "internal" to the sdk, so cannot provide much more information. If there is anything else we can provide, let me know.
Ciao :-)
The text was updated successfully, but these errors were encountered:
Yep, here is the same error with a different output. This one highlights that the http lib tries to parse a JSON attribute "errcode" even if the webserver didn't return (valid) JSON.
As with the previous comment, this happened when the homeserver was busy and a reverse proxy answered "Bad Gateway".
/home/jaller94/Experiments/position/node_modules/matrix-bot-sdk/lib/http.js:89
if (errBody && 'errcode' in errBody) {
^
TypeError: Cannot use 'in' operator to search for 'errcode' in <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
at Request._callback (/home/jaller94/Experiments/position/node_modules/matrix-bot-sdk/lib/http.js:89:38)
at Request.self.callback (/home/jaller94/Experiments/position/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
at Request.emit (node:domain:475:12)
at Request.<anonymous> (/home/jaller94/Experiments/position/node_modules/request/request.js:1154:10)
at Request.emit (node:events:527:28)
at Request.emit (node:domain:475:12)
at IncomingMessage.<anonymous> (/home/jaller94/Experiments/position/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:641:28)
at IncomingMessage.emit (node:events:539:35)
We recently have deployed a bot using this and we have detected that sometimes it exits (2 times in 72h) with the following error in the logs:
Haven't been able to detect any message in particular causing that, and the whole stack trace seems to be "internal" to the sdk, so cannot provide much more information. If there is anything else we can provide, let me know.
Ciao :-)
The text was updated successfully, but these errors were encountered: