def open_url(self, url, *args, **kwargs):
        result = super(CkanClient, self).open_url(url, *args, **kwargs)
        if self.last_status not in (200, 201):
            if self.last_status == 404:
                raise CkanApiNotFoundError(self.last_status)
            elif self.last_status == 403:
                raise CkanApiNotAuthorizedError(self.last_status)
            elif self.last_status == 409:
                raise CkanApiConflictError(self.last_status)
            else:
                raise CkanApiError(self.last_message)
        return result
dataset/ETHPy150Open opencolorado/OpenColorado-Tools-and-Utilities/Scripts/Harvest/Drcog/ckanclient/__init__.py/CkanClient.open_url/original