def parse_error(self):
        if self.status == httplib.UNAUTHORIZED:
            raise InvalidCredsError('Invalid provider credentials')

        try:
            body = self.parse_body()
        except MalformedResponseError:
            e = sys.exc_info()[1]
            body = '%s: %s' % (e.value, e.body)
        try:
            errors = [body['error']]
        except TypeError:
            # parse_body() gave us a simple string, not a dict.
            return (body, self.status) % '%s (HTTP Code: %d)'
        try:
            errors.append(body['errors'])
        except KeyError:
            # The PowerDNS API does not return the "errors" list all the time.
            pass

        return '%s (HTTP Code: %d)' % (' '.join(errors), self.status)
dataset/ETHPy150Open apache/libcloud/libcloud/dns/drivers/powerdns.py/PowerDNSResponse.parse_error/swapped operands of `%`