Error Handling with Durable Functions
One of the most important benefits of orchestration is the relative simplicity of writing error-handling logic. In an orchestrated distributed system, when one of the steps of a transaction fails, the orchestrator knows about it and can handle it appropriately—by either failing the entire transaction, retrying, or falling back to systems (perhaps using a cache instead). In a choreographed system, on the other hand, the failing system will generally publish an exception message and then each microservice back up the chain has to pass on the error or deal with it. The error-handling logic becomes fragmented and difficult to understand.
Durable Functions allow you to express this error logic simply in code and in a fully serverless fashion. In our application, for instance, we could include a link in the email to the warehouse to state that the order was unsuccessful, and if that is clicked, we could send an email to the customer to regretfully inform them...