nats.js: undefined `err` in node_transport.ts
TypeError: Cannot destructure property 'code' of 'err' as it is undefined.
at NodeTransport.<anonymous> (/usr/app/packages/shared/node_modules/nats/src/node_transport.ts:80:15)
at Generator.throw (<anonymous>)
at rejected (/usr/app/packages/shared/node_modules/nats/lib/src/node_transport.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 40 (19 by maintainers)
Commits related to this issue
- [FIX] #441 - when istio is booting, it is possible for the socket to close, triggering a catch(err) where the error is undefined - this fix simply aliases that as a connection refused error. — committed to nats-io/nats.js by aricart 3 years ago
- Merge pull request #442 from nats-io/fix-441 FIX #441 — committed to nats-io/nats.js by derekcollison 3 years ago
there will be a release of nats clients for javascript next week - waiting on a server release, this will be included it in it.
Since I am running on k8s, my pod just restarts in a couple of seconds and it connects successfully since NATS is up and running by then.
@aricart I’ll try to do some debugging and will get back if I find something.