def process(http_error, error_response):
        """
        Tries to process an error meaningfully

        :param http_error: an instance of compat_urllib_error.HTTPError
        :param error_response: body of the error response
        """
        error_msg = http_error.reason
        if http_error.code == ClientErrorCodes.REQ_HEADERS_TOO_LARGE:
            raise ClientReqHeadersTooLargeError(
                error_msg,
                code=http_error.code,
                error_response=error_response)

        try:
            error_obj = json.loads(error_response)
            error_message_type = error_obj.get('error_type', '') or error_obj.get('message', '')
            if http_error.code == ClientErrorCodes.TOO_MANY_REQUESTS:
                raise ClientThrottledError(
                    error_obj.get('message'), code=http_error.code,
                    error_response=json.dumps(error_obj))

            for error_info in ErrorHandler.KNOWN_ERRORS_MAP:
                for p in error_info['patterns']:
                    if re.search(p, error_message_type):
                        raise error_info['error'](
                            error_message_type, code=http_error.code,
                            error_response=json.dumps(error_obj)
                        )
            if error_message_type:
                error_msg = '{0!s}: {1!s}'.format(http_error.reason, error_message_type)
            else:
                error_msg = http_error.reason
        except ValueError as ve:
            # do nothing else, prob can't parse json
            logger.warning('Error parsing error response: {}'.format(str(ve)))

        raise ClientError(error_msg, http_error.code, error_response)

        Tries to process an error meaningfully

        :param http_error: an instance of compat_urllib_error.HTTPError
        :param error_response: body of the error response
        
instagram_private_api/errors.py