def METHOD_NAME(func):
    """Intercept the response and raise an exception if the status code is not 200."""
    @wraps(func)
    def wrapper(*args, **kwargs):
        """The wrapper function."""
        # Extend some capabilities of func
        resp = func(*args, **kwargs)
        if resp.status_code != ResponseCodes.OK.value:
            if resp.status_code == ResponseCodes.NOT_FOUND.value:
                return None
            json_resp = resp.json()
            if "error" in json_resp.keys():
                raise WebError(json_resp["error"])
            resp.raise_for_status()
        if not resp.text:
            return None
        result = resp.json()
        return result.get("data") if "data" in result else result
    return wrapper