didReceiveError(task:_:)

Called when error was thrown during request execution. Will be called zero or one time only. Request processing will be stopped after that.

HTTPHandler.swift:707
func didReceiveError(task: HTTPClient.Task<Response>, _ error: Error)

Parameters

task

Current request context.

error

Error that occured during response processing.

This function may be called at any time: it does not respect the backpressure exerted by didReceiveHead(task:_:) and didReceiveBodyPart(task:_:). All outstanding work may be cancelled when this is received. Once called, no further calls will be made to didReceiveHead(task:_:), didReceiveBodyPart(task:_:), or didFinishRequest(task:).