error path

The route through code taken when something goes wrong, such as invalid input, a timeout or a failed dependency.

In more detail

Error paths are the least tested code in most systems because the failure is hard to produce on demand. A test double that raises the error you need is the usual way to reach them, and a coverage report's missing lines often point straight at them.

Related terms

Taught in

References