Skip to content

Commit 42858b8

Browse files
author
Matt Sokoloff
committed
better error handling
1 parent 3678aab commit 42858b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

labelbox/schema/project.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ def export_queued_data_rows(self, timeout_seconds=120):
182182
res = res["exportQueuedDataRows"]
183183
if res["status"] == "COMPLETE":
184184
download_url = res["downloadUrl"]
185-
data = requests.get(download_url)
186-
return ndjson.loads(data.text)
185+
response = requests.get(download_url)
186+
response.raise_for_status()
187+
return ndjson.loads(response.text)
187188
elif res["status"] == "FAILED":
188189
raise LabelboxError("Data row export failed.")
189190

0 commit comments

Comments
 (0)