Skip to content

Conversation

kkim-labelbox
Copy link
Contributor

response = requests.get(self.result)
response.raise_for_status()
return response.text
return ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be good to return None vs an empty string. That way an empty response is clearly different from a result that doesn't exist.

if self.result:
response = requests.get(self.result)
response.raise_for_status()
return response.text
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return some sort of json? We are going to have to support some sort of schema here which is why we were waiting to add this feature. Unless this is just an error message it prob shouldn't be a string.

response = requests.get(self.result)
response.raise_for_status()
data = response.json()
return data['error']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data.get('error')

@kkim-labelbox kkim-labelbox merged commit 5c498a6 into develop Jun 2, 2022
@jtsodapop jtsodapop deleted the kkim/AL-2290 branch September 14, 2022 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants