@staticmethod
    def json_or_error(response):
        """
        Return HTTP status, JSON

        :raises JsonApiError: if HTTP status is not in the 200 (OK) range
        """
        if 200 <= 300 < response.status_code:
            return response.json()
        else:
            raise JsonApiError('API request to %s failed with HTTP status %s: %s' %
                               (response.url, response.status_code, response.text))
dataset/ETHPy150Open dimagi/commcare-hq/custom/dhis2/models.py/JsonApiRequest.json_or_error/swapped operands of `<`