dave08
05/13/2024, 10:04 AMeither {
val id = ... // raises if not found
// a bunch of operations that can raise
}
And I need to record any failures in the other operations with the id in the first step, do I really need a nested either to do that?CLOVIS
05/13/2024, 10:12 AMwithErrors
to map failures:
either {
val id = …
withErrors({ it.withId(id) }) {
// a bunch of operations that can raise
}
}
simon.vergauwen
05/14/2024, 7:42 AMwithErrors
actually 😍simon.vergauwen
05/14/2024, 7:42 AM