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



57
58
59
60
61
# File 'lib/httpx/errors.rb', line 57

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.



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

def request
  @request
end

Instance Method Details

#marshal_dumpObject



63
64
65
# File 'lib/httpx/errors.rb', line 63

def marshal_dump
  [message]
end