Streams API is crashing my bot

I gave this a try and put my entire API check inside the try statement, but it doesn’t appear to work… Now all I’m getting is this error:

    events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: getaddrinfo ENOTFOUND. Hostname: https://tmi.twitch.tv
    at errnoException (dns.js:37:11)
    at Object.onanswer [as oncomplete] (dns.js:124:16)

I figured out which API was giving the problem, which is the chatter’s list. I’ve disabled it for now because it’s on Twitch’s end, but I’m still confused as to why the try/catch didn’t catch the error and prevent the crashes