Also, not immediately relevant to your current issue but something that might be worth considering for the future: using the htmx websocket extension, you can basically implement a streaming HTML approach (example using Kitten: https://ar.al/2024/03/08/streaming-html/) where you can just stream errors to the page as they happen.
People complain too much about error handling in #Go. Like it or not, go treats errors like any other value. Since the compiler forces you to use all return values of functions, unless you specifically discard the error, you're always aware of which functions can error and that goes a long way to improve the reliability of your software.
Java has checked exceptions, JavaScript trusts you to know that a function 20 slots down the call stack has an unhandled error.
Great blog post about how to design error handling https://keleshev.com/composable-error-handling-in-ocaml. It specifically talks about OCaml but I think the tradeoffs are valid for any general purpose programming language. The option that author thinks the best is also the same scheme that I considered in the past as the ideal way to denote errors in type signatures.
Sometimes when you have a workflow in your system you know in advance that there are some validations and other business rules that may make it fail these are expected errors (not to confuse with exceptions) and are quite cumbersome to handle with exceptions or other error handling techniques, in F# and other languages like rust you have the ability to define that via the Result<value></value> type!
Here we have a simple simulated workflow that may fail or not which will be handled later!
In the second picture we have our Featured F# library from today (link below) which provides a set of helpers and computation expressions that allows us to express these flows in a very convenient way.
Tackle those C# errors with ease 😎 and say hello to simple error handling and logging with SquidEyes.Fundamentals. While you're at it, why not dip your toes into Web 3.0? Join us at the next #phillydotnet meetup. 🙌