Hi
I am develobing node js tool to get data from octoprint API
And I want to cover if my tool running but octoprint not running
When I try to run my tool when octoprint turned off
I face this error
events.js:183
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 0.0.0.0:5000
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
I try to catch it but I fail
Can someone help me with this
How I can catch it so I can run octoprint then try to connect
Thank you