Net::HTTPResponse#value raises "Net::HTTPServerException" in 4xx response
value method to an instance of
Net::HTTPResponse it raises
Net::HTTPServerException in case of HTTP response status code is 4xx.
But HTTP response status code 4xx means "Client error response" not "Server response" so I think that's wrong naming.
Therefore, I think it's maybe specifications bug, but it cause breaking changes in many ruby programs to change exception name.
I propose to create
Net::HTTPClientException as alias of the
Net::HTTPServerException for compatibility.
Updated by unasuke (Yusuke Nakamura) over 5 years ago
- File lib_net_http_exceptions_with_deprecate.patch lib_net_http_exceptions_with_deprecate.patch added
k0kubun (Takashi Kokubun) wrote:
I like this. If nobody has an objection, I want to
deprecate_constantthe old one, and would like the same fix for Net::ProtoServerError as well.
I updated the patch. Like this?