@staticmethod
def _handle_response(res):
    """
        Check for errors and return json response in case of 200 HTTP response code
        :param res: response from a HTTP request
        :return: dict of json response
        """
    if res.status_code != 200:
        if res.status_code == 404:
            raise ValueError('HTTP Response 404 (Not Found): ' + res.text)
        if res.status_code == 403:
            raise ValueError('HTTP Response 403 (Forbidden): ' + res.text)
        if res.status_code == 401:
            raise PermissionError('HTTP Response 401 (Not Authorized): ' +
                res.text)
        if res.status_code == 400:
            raise ValueError('HTTP Response 400 (Validation Error): ' + res
                .text)
        else:
            raise RuntimeError('Unkown HTTP Error: ' + res.text)
    return res.json()
