You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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!