News for hackers. Stuff that matters.
Re:Most RESTful APIs Aren't RESTful by bunderbunder on Friday July 11, 2025 @01:46PM (#44535063)
I worked at a place that had a really great coding standard for working with exceptions:

1. Catch exceptions third-party code and talking to the outside world right away.

2. Never catch exceptions that we throw ourselves.

3. Only (and always) throw exceptions when you're in a state where you can't guarantee graceful recovery. Exceptions are for those exceptional circumstances where the best thing to do is fail fast and fail hard.

There are no comments on this comment yet.