def getErrorMessage(self):
        """
        Get a string of the exception which caused this Failure.
        """
        if isinstance(self.value, Failure):
            return self.value.getErrorMessage()
        return reflect.safe_str(self.value)

        Get a string of the exception which caused this Failure.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/failure.py