Open nikmartin opened 5 years ago
+1 wondering this.
I have
process.on('uncaughtException', function (err) { console.log('Caught exception: ', err); });
And not sure how to gracefuly send a 400 response on error
you need to use the returned client object, and add listeners like this:
let client = icy.get(.....);
......
client.on("error", () => { res.status(400).end(err); });
client.on("timeout", () => { res.status(400).end(err); });
I'm setting up my icy reader like:
But if node-icy connects to a bad url, or one that doesn't respond, the connection never times out. Should I be listening for something other than 'timeout'?