Hacker News new | ask | show | jobs
by pasta 3431 days ago
But then you will never know in your code if there was an error. What if you want to send an other HTTP response in case of an error?

With an exception you can still generate a json response, but also handle errors in the way you like.