Stream.mapErr<F>(fn: (error: E) => Promisable<F>): Stream<T, F>
Similar to Array.prototype.map, but works on the stream of errors. If the provided function throws an error or returns a rejected promise, the new error will be collected and emitted as an error result in the stream.
fn: (error: E) => Promisable<F>