def to_data(self):

        data = copy.deepcopy(self.data)
        if self.code in self.error_msgs:
            data = {
                'message_short': self.error_msgs[self.code]['message_short'],
                'message_long': self.error_msgs[self.code]['message_long']
            }
        else:
            data['message_short'] = 'Unable to resolve'
            data['message_long'] = (
                'OSF was unable to resolve your request. If this issue persists, please report it to '
                '<a href="mailto:support@osf.io">support@osf.io</a>.'
            )
        data.update(self.data)
        data['code'] = self.code
        data['referrer'] = self.referrer

        return data
dataset/ETHPy150Open CenterForOpenScience/osf.io/framework/exceptions/__init__.py/HTTPError.to_data/original