Skip to content

Commit 6b661a7

Browse files
committed
Timeout::Error happens occasionally and should be classified as a Pardot::NetError so implementors don't need to catch multiple types of exceptions
1 parent a887561 commit 6b661a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pardot/http.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def get object, path, params = {}, num_retries = 0
99
rescue Pardot::ExpiredApiKeyError => e
1010
handle_expired_api_key :get, object, path, params, num_retries, e
1111

12-
rescue SocketError, Interrupt, EOFError, SystemCallError => e
12+
rescue SocketError, Interrupt, EOFError, SystemCallError, Timeout::Error => e
1313
raise Pardot::NetError.new(e)
1414
end
1515

@@ -21,7 +21,7 @@ def post object, path, params = {}, num_retries = 0
2121
rescue Pardot::ExpiredApiKeyError => e
2222
handle_expired_api_key :post, object, path, params, num_retries, e
2323

24-
rescue SocketError, Interrupt, EOFError, SystemCallError => e
24+
rescue SocketError, Interrupt, EOFError, SystemCallError, Timeout::Error => e
2525
raise Pardot::NetError.new(e)
2626
end
2727

0 commit comments

Comments
 (0)