That method is needed when you want to use bool::then, but your closure returns Result, and you must use .transpose()? to propagate error to the calling function
In my opinion, the original if-else code is really nice and readable, while the transpose, but also a try_then, would require me to think more, not really making the code nicer but only more confusing. You can also remove the outer (pink) block, which will cut down two more lines from the original if-else code.