Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def raise_for_error(self):
# FIXME: We need better handling of the actual responses, once those are more accurately documented.
if self.error:
raise exc.ActivityUploadFailed(self.error)
elif self.status == "The created activity has been deleted.":
raise exc.CreatedActivityDeleted(self.status)