fail(reason:)

Initiate cancellation of a HTTP request with an error.

HTTPHandler.swift:1018
func fail(reason error: any Error)

Parameters

error

the error that is used to fail the promise

This method will return immeidately and doesn’t wait for the cancellation to complete.