def _sendError(self, fail, requestID):
        """
        (internal) Send an error for a previously sent message.

        @param fail: The failure.
        @param requestID: The request ID.
        """
        if isinstance(fail, failure.Failure):
            # If the failures value is jellyable or allowed through security,
            # send the value
            if (isinstance(fail.value, Jellyable) or
                self.security.isClassAllowed(fail.value.__class__)):
                fail = fail.value
            elif not isinstance(fail, CopyableFailure):
                fail = failure2Copyable(fail, self.factory.unsafeTracebacks)
        if isinstance(fail, CopyableFailure):
            fail.unsafeTracebacks = self.factory.unsafeTracebacks
        self.sendCall(b"error", requestID, self.serialize(fail))

        (internal) Send an error for a previously sent message.

        @param fail: The failure.
        @param requestID: The request ID.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/pb.py