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
I'm using superagent v8.0.0 to manage requests for a homebridge plugin that I have written (homebridge-caddx-interlogix). I have written a helper function to handle requests, that looks like this:
Even though all superagent.post calls are preceded by await and wrapped in try/catch blocks, I still get intermittent unhandled errors. Please bear in mind that the this.login() function also calls this same makeRequest one to actually log in to the server in question. The two issues that crop up are:
Error: socket hang up
at connResetException (node:internal/errors:692:14)
at Socket.socketOnEnd (node:_http_client:478:23)
at Socket.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
and
Error: Found
at Request.callback (/usr/lib/node_modules/homebridge-caddx-interlogix/node_modules/superagent/src/node/index.js:900:17)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/homebridge-caddx-interlogix/node_modules/superagent/src/node/index.js:1153:18)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
All calls to superagent.post(), as well as to my helper are also prefixed with async and wrapped in try/catch blocks that manage the errors, and these exceptions stay unhandled nonetheless.
Any ideas on this? Thanks in advance :)
The text was updated successfully, but these errors were encountered:
I'm using superagent v8.0.0 to manage requests for a homebridge plugin that I have written (homebridge-caddx-interlogix). I have written a helper function to handle requests, that looks like this:
Even though all superagent.post calls are preceded by await and wrapped in try/catch blocks, I still get intermittent unhandled errors. Please bear in mind that the this.login() function also calls this same makeRequest one to actually log in to the server in question. The two issues that crop up are:
and
All calls to superagent.post(), as well as to my helper are also prefixed with async and wrapped in try/catch blocks that manage the errors, and these exceptions stay unhandled nonetheless.
Any ideas on this? Thanks in advance :)
The text was updated successfully, but these errors were encountered: