Incorrect statements about exceptions in the Wiki for Stream and for Timeouts

  1. https://honeyryderchuck.gitlab.io/httpx/wiki/Stream says

    # NOT POSSIBLE
    response = http.get("https://nghttp2.orh/httpbin/status/404", stream: true)
    # HTTPX::HTTPError raised

    but this seems to be false; the exception is only raised on calling response.each (or .each_line which calls .each).

  2. https://honeyryderchuck.gitlab.io/httpx/wiki/Timeouts several times says expiring timeouts raise exceptions, but in fact they seem to return HTTPX::ErrorResponses wrapping those exceptions (unless stream: true is used, of course):

    [6] pry(main)> response = HTTPX.get("https://google.com", timeout: { request_timeout: 0.001 })
    => #<HTTPX::ErrorResponse:0x00007ffabfab7310
     @error=#<HTTPX::RequestTimeoutError: Timed out after 0.001 seconds>,
Edited by Alexey Romanov