Skip to content

Commit ab15e2f

Browse files
author
Kevin Kim
committed
Change task.error() to return None if 'error' doesn't exist
1 parent f3d9476 commit ab15e2f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

labelbox/schema/task.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,5 @@ 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}")
80-
return data['error']
78+
return data.get('error')
8179
return None

0 commit comments

Comments
 (0)