Code should fail immediately when something goes wrong, making errors easier to detect and fix.

Description

When an error occurs, it is best to fail fast by stopping the program as soon as possible. This makes it easier to identify the root cause of the problem and fix it. Failing fast is especially important in distributed systems, where errors can be difficult to track down.

Examples