solr-node-client icon indicating copy to clipboard operation
solr-node-client copied to clipboard

Uncaught exception when client.ping is called against unresponsive Solr instance

Open julianlam opened this issue 3 years ago • 0 comments

In this specific case, there is no Solr instance available, so the connection is closed/refused. When the client attempts to call client.ping(), it throws an exception that I cannot catch, and crashes the Node.js server.

$ node -v
v14.18.1
(node:12938) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:8983
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)
    at TCPConnectWrap.callbackTrampoline (internal/async_hooks.js:130:17)

julianlam avatar Jan 30 '22 18:01 julianlam