def to_text(self):
        lines = ['%s - %s' % (self.code, self.message)]
        if self.detail:
            lines.extend(['', self.detail])
        if self.error_type:
            lines.extend(['', 'Error type: %s' % self.error_type])
        return '\n'.join(lines)
dataset/ETHPy150Open mahmoud/clastic/clastic/errors.py/HTTPException.to_text/original