flatMapFailure

Transforms Outcome<Ok, ErrorIn> into Outcome<Ok, ErrorOut> by applying transform to the Failure error.

  • Success outcomes pass through; the Ok is re-wrapped to satisfy the new monad wrapper for ErrorOut.

  • Unlike mapFailure, transform must return a full Outcome — the wrapper is not added for you.

  • No error handling is provided.

Parameters

transform

Converts the Failure error into an Outcome.

See also