Skip to content

Commit 28bd6ec

Browse files
committed
Add an error message in order to retry
1 parent 3c9d1cd commit 28bd6ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/embulk/output/bigquery/google_client.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ def with_network_retry(&block)
5050
begin
5151
yield
5252
rescue ::Java::Java.net.SocketException, ::Java::Java.net.ConnectException => e
53-
if ['Broken pipe', 'Connection reset', 'Connection timed out'].select { |x| e.message.include?(x) }.empty?
53+
retry_messages = [
54+
'Broken pipe',
55+
'Connection reset',
56+
'Connection timed out',
57+
'Connection or outbound has closed',
58+
]
59+
if retry_messages.select { |x| e.message.include?(x) }.empty?
5460
raise e
5561
else
5662
if retries < @task['retries']

0 commit comments

Comments
 (0)