Reporting Successes and Errors
Explore methods to report successes and errors within Elixir processes using GenServer. Learn how to manage partial successes, halt on failure with Enum.reduce_while, and ensure reliable error handling essential for building fault-tolerant systems.
Reporting partial success
First, let’s report partial success as we go until there’s an error. We’ll enter this at the end of pipeline_errors.exs after the module:
To see this in action, we’ll run this script through the following command:
Executable
Output
Report partial success:
[
{:error, %RuntimeError{message: "Oops!"}, 1},
{:result, ...