Handle bad response errors without response object (#765)

We have received word that a bad proxy setting can cause this behavior.

[fixes #764]
This commit is contained in:
Mike Moore authored and GitHub committed 2019-02-14 14:14:34 -07:00
1 parent 06a01959cf
commit 6e90789b27
2 files changed
+27

No files matched your search

+1
View File
@@ -271,6 +271,7 @@ module Google
if err.is_a?(HTTPClient::BadResponseError)
begin
res = err.res
raise Google::Apis::TransmissionError.new(err) if res.nil?
check_status(res.status.to_i, res.header, res.body)
rescue Google::Apis::Error => e
err = e