Project

General

Profile

Actions

Feature #10129

open

More descriptive error message for failed net/http requests

Added by xshay (Xavier Shay) over 9 years ago. Updated over 6 years ago.

Status:
Assigned
Target version:
-
[ruby-core:64347]

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

net-http-error-message.diff (1.43 KB) net-http-error-message.diff xshay (Xavier Shay), 08/13/2014 10:36 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0