future(error:)

Creates a new, failed EventLoopFuture from the worker’s event loop.

EventLoop+Future.swift:29
func future<T>(error: Error) -> EventLoopFuture<T>

Parameters

error

The error that the future will wrap.

Returns

The failed future.

let b: EvenLoopFuture = req.future(error: Abort(…))