From cd03f9e69dcd783a18720886fac8c228ebbed8fd Mon Sep 17 00:00:00 2001 From: sonots Date: Thu, 20 Apr 2017 15:51:10 +0900 Subject: [PATCH] Get error message from e.getMessage() instead of e.message (e.getLocalizedMessage()) --- lib/embulk/output/bigquery/google_client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/embulk/output/bigquery/google_client.rb b/lib/embulk/output/bigquery/google_client.rb index b588396..861b716 100644 --- a/lib/embulk/output/bigquery/google_client.rb +++ b/lib/embulk/output/bigquery/google_client.rb @@ -80,7 +80,7 @@ def with_network_retry(&block) begin yield rescue ::Java::Java.net.SocketException, ::Java::Java.net.ConnectException => e - if ['Broken pipe', 'Connection reset', 'Connection timed out'].include?(e.message) + if ['Broken pipe', 'Connection reset', 'Connection timed out'].include?(e.getMessage()) if retries < @task['retries'] retries += 1 Embulk.logger.warn { "embulk-output-bigquery: retry \##{retries}, #{e.class} #{e.message}" }