Exception: HTTPX::TimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/httpx/errors.rb,
sig/errors.rbs

Overview

Error raised when there was a timeout. Its subclasses allow for finer-grained control of which timeout happened.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#timeout ⇒ interval (readonly)

The timeout value which caused this error to be raised.

Returns:

  • (interval)


15
16
17
# File 'lib/httpx/errors.rb', line 15

def timeout
  @timeout
end

Instance Method Details

#to_connection_error ⇒ ConnectTimeoutError

clones this error into a HTTPX::ConnectionTimeoutError.

Returns:



25
26
27
28
29
# File 'lib/httpx/errors.rb', line 25

def to_connection_error
  ex = ConnectTimeoutError.new(@timeout, message)
  ex.set_backtrace(backtrace)
  ex
end