Hi, I'm looking for something like saga for transa...
# arrow
m
Hi, I'm looking for something like saga for transactions but the documentation is a little soft and I would like use this library because I believe that is awesome
I'm looking something like: given a code block with either if it "raise" so throw rollback with another code block, idk if exist something like this
s
Hey Matthew, The Saga of Arrow Resillience does exactly that, but it's indeed missing from the documentation. https://arrow-kt.io/learn/resilience/saga/ i.e.
Copy code
either {
  saga {
    saga({ println("ACTION") }) {
      println("Compensation")
    }
    raise("failure")
  }
}
// ACTION
// COMPENSATION
// res: Either.Left("failure")
a
I've made a PR to bring this example into the docs -> https://github.com/arrow-kt/arrow-website/pull/371
🥳 3
m
Thanks a lot guys, aammm idk if this is the correct thread but I want to contribute in this library. I discovered it and I like it a lot
arrow intensifies 1
s
Check out #C8UK6RTHU if you have any doubts or questions! 👍
m
Thanks Simon!!