I am fresh new with the brilliant language-ext c# library.
I have this code that returns a Try<IEnumerable<Try<Unit>>
object:
Try(DetectAlertsToNotify)
.MapT(SendNotification)
//treat errors happened indifferently from their source
Edit: DetectAlertsToNotify returns an IEnumerable of AlertDTO
What I would like to achieve is to process elegantly all exceptions or maybe the first exception whatever it happened in DetectAlertsToNotify or SendNotification.
How could I aggregate all errors or take the first error of Try<IEnumerable<Try<Unit>>
with keeping code simple and minimum as possible?