lib/td/client/api/export.rb in td-client-1.0.5 vs lib/td/client/api/export.rb in td-client-1.0.6
- old
+ new
@@ -26,10 +26,10 @@
# @param [String] target_job_id
# @param [Hash] opts
# @return [String] job_id
def result_export(target_job_id, opts={})
code, body, res = post("/v3/job/result_export/#{target_job_id}", opts)
- if code != "200"
+ if code[0] != ?2
raise_error("Result Export failed", res)
end
js = checked_json(body, %w[job_id])
return js['job_id'].to_s
end