How to use the arsenic.errors.raise_exception function in arsenic

To help you get started, we’ve selected a few arsenic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HDE / arsenic / src / arsenic / connection.py View on Github external
def check_response_error(status: int, data: Any) -> None:
    if status >= 400:
        errors.raise_exception(data, status)
github HDE / arsenic / src / arsenic / session.py View on Github external
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)