Skip to content

Commit f33f234

Browse files
committed
Pardot rarely but occasionally returns what appears to be HTML which causes the XML parser to error. I believe this happens when the Pardot webserver (not the Pardot app) handles load or connection issues, not knowing the client expects XML
1 parent 6b661a7 commit f33f234

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, Timeout::Error => e
12+
rescue SocketError, Interrupt, EOFError, SystemCallError, Timeout::Error, MultiXml::ParseError => 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, Timeout::Error => e
24+
rescue SocketError, Interrupt, EOFError, SystemCallError, Timeout::Error, MultiXml::ParseError => e
2525
raise Pardot::NetError.new(e)
2626
end
2727

0 commit comments

Comments
 (0)