def get_response(self):
        try:
            msg = smart_str(self.msg.decode())
        except (__HOLE__,):
            msg = smart_str(self.msg)
        error = {
            'success': False,
            'data': {
                'code': self.code,
                'message': msg
            }
        }
        error.update(self.extra)

        response = self.RESPONSES[self.code]()
        response.content = json.dumps(error, separators=(',', ':'))
        return response
dataset/ETHPy150Open joestump/django-ajax/ajax/exceptions.py/AJAXError.get_response