Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Statuspage metrics nodejs example doesn't do error checking?

Paul Dejean
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 7, 2020

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?

1 answer

0 votes
Dave Parrish _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 7, 2020

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!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events