Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)