cascadeFailure(to:)

Fails the given EventLoopPromise with the error from this EventLoopFuture if encountered.

EventLoopFuture.swift:1048
func cascadeFailure<NewValue>(to promise: EventLoopPromise<NewValue>?)

Parameters

promise

The EventLoopPromise that should fail with the error of this EventLoopFuture.

This is an alternative variant of cascade that allows you to potentially return early failures in error cases, while passing the user EventLoopPromise onwards.