onRecoverRequest

open suspend fun onRecoverRequest(request: HttpRequest, error: HttpError): HttpTry<HttpRequest>

Called when the HTTP client received an error for the given request, to provide an opportunity to the implementer to recover from it.

You can return either:

  • a new recovery request to start

  • the error argument, if you cannot recover from it

  • a new HttpError to provide additional information