Issue #10129 has been updated by Xavier Shay.

File net-http-error-message.diff added

Attaching diff, possibly more useful than github PR.

----------------------------------------
Feature #10129: More descriptive error message for failed net/http requests
https://bugs.ruby-lang.org/issues/10129#change-48326

* Author: Xavier Shay
* Status: Open
* Priority: Low
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
Hello,
I would like to propose the following patch:

Before

    2.1.2 :003 > Net::HTTP.get(URI.parse("https://arsrtrtrstsrt.com/arstr"))
    SocketError: getaddrinfo: nodename nor servname provided, or not known

After

    2.1.2 :003 > Net::HTTP.get(URI.parse("https://arsrtrtrstsrt.com/arstr"))
    SocketError: Failed to open TCP connection to arsrtrtrstsrt.com:443 (getaddrinfo: nodename nor servname provided, or not known)

I have an implementation with test at https://github.com/ruby/ruby/pull/700

Thank you for your consideration,
Xavier

---Files--------------------------------
net-http-error-message.diff (1.43 KB)


-- 
https://bugs.ruby-lang.org/