Copilot commented on code in PR #3650:
URL: https://github.com/apache/thrift/pull/3650#discussion_r3618050250
##########
lib/rb/lib/thrift/transport/http_client_transport.rb:
##########
@@ -55,6 +55,9 @@ def flush
raise TransportException.new(TransportException::UNKNOWN,
"#{self.class.name} Could not connect to #{@url}, HTTP status code
#{resp.code.to_i}") unless (200..299).include?(resp.code.to_i)
data = resp.body
+ if data.nil? || data.empty?
+ raise TransportException.new(TransportException::UNKNOWN,
"#{self.class.name} received an empty response")
Review Comment:
The new empty-response TransportException message omits the URL and HTTP
status code, which makes it harder to debug (contrast with the existing non-2xx
check that includes both). Consider including these details in the message
while keeping the existing /empty response/ substring for compatibility.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]