Repository navigation
Difference between using map or flatmap to handle errors #1952
Answered
by
jponge
adampoplawski
asked this question in
Q&A
|
Hello If we handle errors in Mutiny should we prefer one way over other way, or is there some logical difference? Thx for help |
Answered by
jponge
Sep 15, 2025
Replies: 2 comments 1 reply
|
The second option works better IMHO, because you can have fine control and report a failed |
0 replies
Answer selected by
adampoplawski
|
So I have followup question :) In pseudo-code like that, wrapping error in Uni is making us do map + call + map. Is it my overinterpretation, that this is more proper? Since we have here sync code and do now throw in call/flatMap, first option seems better in this case. I have tested that also is working without wrapping in Uni so we have same control on failed Uni or you had other issue in mind? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The second option works better IMHO, because you can have fine control and report a failed
Uniif needed.