Divide Potential Errors

Divide potential errors into 3 groups:

  • Domain errors are expected in the business processes themselves, such as an unaccepted order or lack of goods in stock;
  • Exceptions(panics) lead the system to an unrecoverable state, such as out of array or lack of memory;
  • Infrastructural error are expected from a technical point of view, but not by the business, like failed authentication or network problems.