mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-11-05 00:01:26 -05:00
connection reference should not remain in the response which goes to the user, as that may leak the reference which will block garbage collection of objects in the selector
69 lines
1.3 KiB
Plaintext
69 lines
1.3 KiB
Plaintext
module HTTPX
|
|
class Error < StandardError
|
|
end
|
|
|
|
class UnsupportedSchemeError < Error
|
|
end
|
|
|
|
class ConnectionError < Error
|
|
end
|
|
|
|
class TimeoutError < Error
|
|
attr_reader timeout: Numeric
|
|
|
|
def to_connection_error: () -> ConnectTimeoutError
|
|
private
|
|
|
|
def initialize: (Numeric timeout, String message) -> untyped
|
|
end
|
|
|
|
class PoolTimeoutError < TimeoutError
|
|
end
|
|
|
|
class ConnectTimeoutError < TimeoutError
|
|
end
|
|
|
|
class SettingsTimeoutError < TimeoutError
|
|
end
|
|
|
|
class ResolveTimeoutError < TimeoutError
|
|
end
|
|
|
|
class RequestTimeoutError < TimeoutError
|
|
attr_reader request: Request
|
|
attr_reader response: response?
|
|
|
|
def initialize: (Request request, response? response, Numeric timeout) -> void
|
|
end
|
|
|
|
class ReadTimeoutError < RequestTimeoutError
|
|
end
|
|
|
|
class WriteTimeoutError < RequestTimeoutError
|
|
end
|
|
|
|
class OperationTimeoutError < TimeoutError
|
|
end
|
|
|
|
class ResolveError < Error
|
|
end
|
|
|
|
class HTTPError < Error
|
|
attr_reader response: Response
|
|
|
|
def status: () -> Integer
|
|
|
|
private
|
|
|
|
def initialize: (Response response) -> void
|
|
end
|
|
|
|
class NativeResolveError < ResolveError
|
|
attr_accessor connection: Connection?
|
|
attr_reader host: String
|
|
|
|
private
|
|
|
|
def initialize: (Connection connection, String hostname, ?String message) -> untyped
|
|
end
|
|
end |