Skip to content

Commit 68cdfe6

Browse files
author
kanji-yomoda
committed
Include original error message to json parse error
1 parent a4b25bd commit 68cdfe6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/embulk/output/bigquery.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def self.configure(config, schema, task_count)
135135
json_key = JSON.parse(task['json_keyfile'])
136136
task['project'] ||= json_key['project_id']
137137
rescue => e
138-
raise ConfigError.new "json_keyfile is not a JSON file"
138+
raise ConfigError.new "Parse json_keyfile failed with error: #{e.message}"
139139
end
140140
end
141141
if task['project'].nil?
@@ -166,7 +166,7 @@ def self.configure(config, schema, task_count)
166166
begin
167167
JSON.parse(File.read(task['schema_file']))
168168
rescue => e
169-
raise ConfigError.new "schema_file #{task['schema_file']} is not a JSON file"
169+
raise ConfigError.new "Parse schema_file #{task['schema_file']} failed with error: #{e.message}"
170170
end
171171
end
172172

0 commit comments

Comments
 (0)