class PardotAPIError(Exception):
    """
    Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out
    the error code and message.
    """

    def __init__(self, json_response):
        self.response = json_response
        self.err_code = json_response.get('@attributes').get('err_code')
        self.message = str(json_response.get('err'))
        if self.err_code is None:
            self.err_code = 0
            self.message = 'Unknown API error occurred'

    def __str__(self):
        return 'Error #{err_code}: {message}'.format(err_code=self.err_code,
            message=self.message)


class PardotAPIArgumentError(Exception):
    pass

2dad061c63835dac3e5c41ca035293be4261e85c
class PardotAPIError(Exception):
    <mask token>
    <mask token>
    <mask token>


class PardotAPIArgumentError(Exception):
    pass

class PardotAPIError(Exception):
    <mask token>
    <mask token>

    def __str__(self):
        return 'Error #{err_code}: {message}'.format(err_code=self.err_code,
            message=self.message)


class PardotAPIArgumentError(Exception):
    pass

class PardotAPIError(Exception):
    <mask token>

    def __init__(self, json_response):
        self.response = json_response
        self.err_code = json_response.get('@attributes').get('err_code')
        self.message = str(json_response.get('err'))
        if self.err_code is None:
            self.err_code = 0
            self.message = 'Unknown API error occurred'

    def __str__(self):
        return 'Error #{err_code}: {message}'.format(err_code=self.err_code,
            message=self.message)


class PardotAPIArgumentError(Exception):
    pass

class PardotAPIError(Exception):
    """
    Basic exception class for errors encountered in API post and get requests. Takes the json response and parses out
    the error code and message.
    """

    def __init__(self, json_response):
        self.response = json_response
        self.err_code = json_response.get('@attributes').get('err_code')
        self.message = str(json_response.get('err'))
        if self.err_code is None:
            self.err_code = 0
            self.message = 'Unknown API error occurred'

    def __str__(self):
        return 'Error #{err_code}: {message}'.format(err_code=self.err_code,
            message=self.message)


class PardotAPIArgumentError(Exception):
    pass
