Hello. If I run the node.js example including the line:
var apiKey = 'your-api-key-goes-here';
With literally 'your-api-key-goe-here' instead of my actual API key. Of course it doesn't succeed at submitting metrics (presumably it gets a 401 error) but the script continues like nothing is wrong.
How could the example be improved in order to do some basic error checking?