Recovery and compound causes

Use Flow.recover when a typed failure needs a fallback with a different error type. Like Flow.orElseWith, it handles a single typed failure (including a traced one), not defects or interruption; orElseWith keeps the original error type. Flow.fold can inspect every cause.

When error types change

A compound cause is never recovered. When changing error types, each old typed failure becomes a Cause.Die containing an UnrecoveredFailureException. Its Value retains the original failure as obj; the wrapper's message renders it AOT-safely. The compound structure, existing defects, and interruptions remain.

When a handler throws

A throwing recovery handler produces a defect, except cancellation with the flow's cancelled token, which interrupts.