Skip to content

Commit f3d9476

Browse files
author
Kevin Kim
committed
Check for 'error' key
1 parent 89f3bf4 commit f3d9476

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

labelbox/schema/task.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,7 @@ def errors(self):
7575
response = requests.get(self.result)
7676
response.raise_for_status()
7777
data = response.json()
78+
if 'error' not in data:
79+
raise KeyError(f"Key 'error' does not exist in {data}")
7880
return data['error']
7981
return None

0 commit comments

Comments
 (0)