Skip to content

Commit

Permalink
Merge pull request #120 from treasure-data/result-status
Browse files Browse the repository at this point in the history
Fix result export not to raise when status is 2XX
  • Loading branch information
nurse committed Mar 23, 2018
2 parents 012f932 + be015eb commit 614a463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/td/client/api/export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def export(db, table, storage_type, 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])
Expand Down

0 comments on commit 614a463

Please sign in to comment.