Skip to content

Commit b03bfa1

Browse files
committed
[rb] add logging
1 parent dbed728 commit b03bfa1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

rb/lib/selenium/webdriver/remote/http/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def request(verb, url, headers, payload, redirects = 0)
9696
end
9797

9898
if response.is_a? Net::HTTPRedirection
99+
WebDriver.logger.debug("Redirect to #{response['Location']}; times: #{redirects}")
99100
raise Error::WebDriverError, 'too many redirects' if redirects >= MAX_REDIRECTS
100101

101102
request(:get, URI.parse(response['Location']), DEFAULT_HEADERS.dup, nil, redirects + 1)

rb/lib/selenium/webdriver/remote/server_error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize(response)
2525
if response.is_a? String
2626
super(response)
2727
else
28-
super("status code #{response.code}")
28+
super("status code #{response.code}; payload #{response.payload.to_s}")
2929
end
3030
end
3131
end # ServerError

0 commit comments

Comments
 (0)