for (error <- message.error) protoMessage.setError(ByteString.copyFrom(serializeToBytes(error)))