In the preceding example, we saw that thing do not always go smoothly. Things can go wrong on multiple levels. So when we connect to the cloud authentication service, the connection itself may go wrong. For example, the server reply times out. Or, your application credentials are wrong and you do not end up accessing the feature of the cloud authentication service that you would like to access.
When contacting the database, things can also go wrong. For example, you may fail to establish a connection with the database. Or, for some reason, the data is not present in the database or is not in the correct format.
Finally, the business logic of the application allows for an error. This one happens when the person making ...