onFailure

infix inline fun <Ok, Error> Outcome<Ok, Error>.onFailure(block: (Error) -> Unit): Outcome<Ok, Error>

Calls block with the Failure error if this is a failure, then returns the original Outcome unchanged. No-op on Success.