Hi,
I can't seem to get the RequestTimeoutException thrown.
My app conf has:
spray.can.client.request-timeout = 10 ms
I have an Actor which has the following:
implicit val timeout: Timeout = Timeout(60.seconds)
val url = //...create url
val f: Future[HttpResponse] = IO(Http).ask(HttpRequest(GET, Uri(url))).mapTo[HttpResponse]
case Success(response) =>
case StatusCodes.NotFound =>
logger.error("not found")
case Failure(exception) =>
logger.error("Request Timed out")
This could be entirely my misunderstanding, but given the Future timeout is 60 seconds, and the Spray-Client Request Timeout is 10 milliseconds, I would have expected to have seen "Request Timed Out" in my log. Instead I see "ok".
The code gets an image, something that always takes longer than 10 ms to respond, can any one tell me what I've done wrong?
Thanks!