There are two big categories of errors: those that happen at runtime (also called operational errors) and bugs caused by programmers.
Some examples of the runtime errors include:
System out of memory
Failure to look up domains
Database connection time out
Failure to proxy requests because the server is down
These types of errors do not occur because our programs were badly written, but because a server is down, the network is unreliable, or some other problem that is not caused by an error in the code.
On the other hand, human errors are bugs and can be avoided, for instance:
Operational errors are unavoidable and can happen in any program, so they must be dealt with. Programmer errors, on the other hand, cannot be dealt with reliably. In these situations, we should log the error and let the server...