Skip to content

Instantly share code, notes, and snippets.

@pepetox
Created September 13, 2020 16:39
Show Gist options
  • Save pepetox/c38c77da3415bc02462dc9969a8b5ebe to your computer and use it in GitHub Desktop.
Save pepetox/c38c77da3415bc02462dc9969a8b5ebe to your computer and use it in GitHub Desktop.
Simulate Fail
let count = 0;
exports.helloWorld = (req, res) => {
count++;
if(count<5){
res.status(500).json({"error": "System error"});
}else{
res.status(200).json({"llamada": count});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment