Actions
Feature #10129
openMore descriptive error message for failed net/http requests
Description
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
Updated by xshay (Xavier Shay) over 10 years ago
Attaching diff, possibly more useful than github PR.
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Category set to ext
- Status changed from Open to Assigned
- Assignee set to akr (Akira Tanaka)
- Target version set to 2.2.0
Shouldn't Socket
methods raise more descriptive messages?
Updated by normalperson (Eric Wong) over 10 years ago
nobu@ruby-lang.org wrote:
Shouldn't
Socket
methods raise more descriptive messages?
Yes. I think the EAI_SYSTEM case should also include host/port in the
error message, too.
Updated by naruse (Yui NARUSE) over 10 years ago
Nobuyoshi Nakada wrote:
Shouldn't
Socket
methods raise more descriptive messages?
example domain should use *.invalid
http://tools.ietf.org/html/rfc2606
Updated by naruse (Yui NARUSE) almost 7 years ago
- Target version deleted (
2.2.0)
Actions
Like0
Like0Like0Like0Like0Like0