or error is null.
HttpPromise.fail
void fail(Throwable error)Completes the promise with an error.
Parameters
error | The failure to deliver to the future; must not be null. |
Throws
HttpException when the promise is invalid, already completed,