def check_response_error(*, status: int, data: Any) -> None: if status >= 400: errors.raise_exception(data, status) if not isinstance(data, dict): return data_status = data.get("status", None) if data_status is None: return if data_status == constants.STATUS_SUCCESS: return errors.raise_exception(data, status)
def check_response_error(status: int, data: Any) -> None: if status >= 400: errors.raise_exception(data, status)
def _check_response_error(self, status: int, data: Any): if "status" in data and data["status"] != 0: errors.raise_exception(data, status) if status >= 400 and "value" in data and "error" in data["value"]: errors.raise_exception(data, status)
def _check_response_error(self, status: int, data: Any): if 'status' in data and data['status'] != 0: errors.raise_exception(data, status)