Exception: HTTPX::RequestTimeoutError

Inherits:
TimeoutError show all
Defined in:
lib/httpx/errors.rb

Overview

Error raised when there was a timeout while sending a request, or receiving a response from the server.

Direct Known Subclasses

ReadTimeoutError, WriteTimeoutError

Instance Attribute Summary collapse

Attributes inherited from TimeoutError

#timeout

Instance Method Summary collapse

Methods inherited from TimeoutError

#to_connection_error

Constructor Details

#initialize(request, response, timeout) ⇒ RequestTimeoutError

initializes the exception with the request and response it refers to, and the timeout causing the error, and the



48
49
50
51
52
# File 'lib/httpx/errors.rb', line 48

def initialize(request, response, timeout)
  @request = request
  @response = response
  super(timeout, "Timed out after #{timeout} seconds")
end

Instance Attribute Details

#requestObject (readonly)

The HTTPX::Request request object this exception refers to.



44
45
46
# File 'lib/httpx/errors.rb', line 44

def request
  @request
end

Instance Method Details

#marshal_dumpObject



54
55
56
# File 'lib/httpx/errors.rb', line 54

def marshal_dump
  [message]
end