I'm curious about Nightbot exception handling, and I for the life of me cannot find an answer in these forums.
I have a series of eval commands that include a try/catch block that should return an error if there is a problem. However, no matter how many different ways I've tried, I just can't get the error to print.
As an example, here's an eval command I have for printing out my socials:
$(eval try { const query = decodeURIComponent("$(querystring)"); const response = $(urlfetch json https://raw.githubusercontent.com/NotSwayzeStream/nightbot/v3.0.0/socials.json); response[query] } catch (e) {e})
My expectation would be to have my function print the social account referenced by the query key in the urlfetch response, and if it doesn't exist, to return the error instead. However, when I run this command and use a key that doesn't exist, it fails silently.
Am I missing something? Happy to also be pointed to another post if I'm doing something silly!