flatMapError(_:)

When the current EventLoopFuture<Value> is in an error state, run the provided callback, which may recover from the error by returning an EventLoopFuture<NewValue>. The callback is intended to potentially recover from the error by returning a new EventLoopFuture that will eventually contain the recovered result.

EventLoopFuture+AssumeIsolated.swift:368
func flatMapError(_ callback: @escaping (Error) -> EventLoopFuture<Value>) -> EventLoopFuture<Value>.Isolated where Value : Sendable

Parameters

callback

Function that will receive the error value of this EventLoopFuture and return a new value lifted into a new EventLoopFuture.

Returns

A future that will receive the recovered value.

If the callback cannot recover it should return a failed EventLoopFuture.