Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 41a1ee3

Browse files
committed
Add timeout error
1 parent 100cc30 commit 41a1ee3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/codecov.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,6 @@ def format(result)
261261

262262
uri.query = URI.encode_www_form(params)
263263

264-
puts 'THE URI'
265-
puts uri
266-
267264
# get https
268265
https = Net::HTTP.new(uri.host, uri.port)
269266
https.use_ssl = !url.match(/^https/).nil?
@@ -278,6 +275,10 @@ def format(result)
278275
# make request
279276
begin
280277
response = https.request(req)
278+
rescue TimeoutEror => e
279+
puts 'Error uploading coverage reports to Codecov. Will retry'
280+
puts e
281+
return
281282
rescue StandardError => e
282283
puts 'Error uploading coverage reports to Codecov. Sorry'
283284
puts e

0 commit comments

Comments
 (0)