HttpPromise.fail

void fail(Throwable error)

Completes the promise with an error.

Parameters

errorThe failure to deliver to the future; must not be null.

Throws

HttpException when the promise is invalid, already completed,

or error is null.