def __init__(self, code, message=None, redirect_url=None, data=None):

        super(HTTPError, self).__init__(message)

        self.code = code
        self.redirect_url = redirect_url
        self.data = data or {}

        try:
            self.referrer = request.referrer
        except __HOLE__:
            self.referrer = None
dataset/ETHPy150Open CenterForOpenScience/osf.io/framework/exceptions/__init__.py/HTTPError.__init__