Skip to main content

Handling Errors

val doThings: WIO[MyState, MyError, Nothing]                        =
WIO.pure.error(MyError()).autoNamed
val handleThatNastyError: WIO[(MyState, MyError), Nothing, MyState] =
WIO.pure(MyState(1)).autoNamed

val errorHandled: WIO[MyState, Nothing, MyState] =
doThings.handleErrorWith(handleThatNastyError)