Project

General

Profile

ActionsLike0

Feature #14688

closed

Net::HTTPResponse#value raises "Net::HTTPServerException" in 4xx response

Added by unasuke (Yusuke Nakamura) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Target version:
-
[ruby-core:86545]

Description

Call 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.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#Client_error_responses

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.


Files

lib_net_http_exceptions.patch (999 Bytes) lib_net_http_exceptions.patch unasuke (Yusuke Nakamura), 04/15/2018 01:35 PM
lib_net_http_exceptions_with_deprecate.patch (1.08 KB) lib_net_http_exceptions_with_deprecate.patch unasuke (Yusuke Nakamura), 05/10/2018 03:57 PM

Updated by usa (Usaku NAKAMURA) almost 7 years ago

  • Status changed from Open to Assigned
  • Assignee set to naruse (Yui NARUSE)

Updated by unasuke (Yusuke Nakamura) almost 7 years ago

#5

Updated by naruse (Yui NARUSE) almost 7 years ago

  • Status changed from Assigned to Closed
#6

Updated by naruse (Yui NARUSE) almost 7 years ago

  • Tracker changed from Bug to Feature
  • ruby -v deleted (2.6.0dev)
  • Backport deleted (2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN)
ActionsLike0

Also available in: Atom PDF