Yui
Yui2y ago

Any way to catch error coming from inside npm compat?

I am trying to find some way to catch this so I can do retry logic. rn the process just exits.
3 Replies
ioB
ioB2y ago
Can you show some code on how to reproduce this?
Yui
Yui2y ago
Sure, will make an example I get home. It is a server and client connection over unix socket using https://github.com/timotejroiko/net-ipc .
GitHub
GitHub - timotejroiko/net-ipc: A simple node.js IPC client-server w...
A simple node.js IPC client-server with no dependencies - GitHub - timotejroiko/net-ipc: A simple node.js IPC client-server with no dependencies
Yui
Yui2y ago
The error makes sense. Not being able to catch it is the problem. Basically when the socket server restarts this is expected to happen on the client. Problem is that I should be able to just catch the error and tell client to try reconnecting in 5 seconds or something.