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?
Hey @Paul Dejean , it's Dave from the Statuspage product team. I agree it would be more helpful if our code samples for submitting metrics data included some error handling, in case the API request fails for some reason.
Thanks for the suggestion - I am adding it to our backlog!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.