{"record":{"id":"8e985e2bde516786","repo":"conductor-oss/conductor","slug":"docid-is-empty","errorCode":null,"errorMessage":"docId is empty","messagePattern":"docId is empty","errorType":"validation","errorClass":"NonRetryableException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/tasks/worker/VectorDBWorkers.java","lineNumber":63,"sourceCode":"@Conditional(AIIntegrationEnabledCondition.class)\npublic class VectorDBWorkers implements AnnotatedSystemTaskWorker {\n\n    private static final TypeReference<Map<String, Object>> MAP_OF_STRING_TO_OBJ =\n            new TypeReference<Map<String, Object>>() {};\n\n    private final VectorDBs vectorDBs;\n    private final LLMs llm;\n\n    public VectorDBWorkers(VectorDBs vectorDBs, LLMs llm) {\n        this.vectorDBs = vectorDBs;\n        this.llm = llm;\n        log.info(\"VectorDBWorkers initialized with LLMs: {} and vectorDBs: {}\", llm, vectorDBs);\n    }\n\n    @WorkerTask(\"LLM_INDEX_TEXT\")\n    public void indexText(IndexDocInput input) {\n        if (isBlank(input.getDocId())) {\n            throw new NonRetryableException(\"docId is empty\");\n        }\n\n        try {\n            String chunk = input.getText();\n            EmbeddingGenRequest request =\n                    EmbeddingGenRequest.builder()\n                            .model(input.getEmbeddingModel())\n                            .dimensions(input.getDimensions())\n                            .text(chunk)\n                            .build();\n            request.setLlmProvider(input.getEmbeddingModelProvider());\n            List<Float> embeddings = llm.generateEmbeddings(TaskContext.get().getTask(), request);\n\n            vectorDBs.storeEmbeddings(\n                    input.getVectorDB(),\n                    TaskContext.get(),\n                    input.getIndex(),\n                    input.getNamespace(),","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/tasks/worker/VectorDBWorkers.java#L45-L81","documentation":"Thrown as NonRetryableException by the LLM_INDEX_TEXT worker when input.getDocId() is blank. A stable document id is required to upsert and later retrieve/update the indexed document in the vector store, so a blank id fails the task terminally.","triggerScenarios":"Running LLM_INDEX_TEXT with a blank IndexDocInput.docId; an upstream task that was supposed to generate an id producing null/empty.","commonSituations":"Workflow author forgot to set docId; docId sourced from a template variable that resolved to blank (e.g. missing source field); caller built IndexDocInput without an id; docId derived from a filename that was empty.","solutions":["Provide a non-blank docId in the LLM_INDEX_TEXT input.","Generate a stable id upstream (e.g. UUID or hash of content) and map it into docId.","Verify the template variable feeding docId resolves to a non-empty value.","Confirm the input key is 'docId' (worker reads input.getDocId())."],"exampleFix":"// before\n{ \"text\": \"...\", \"embeddingModel\": \"...\" }  // no docId\n// after\n{ \"docId\": \"${workflow.documentId}\", \"text\": \"...\", \"embeddingModel\": \"...\" }","handlingStrategy":"validation","validationCode":"// Generate/validate a docId before indexing\nif (StringUtils.isBlank(input.getDocId())) {\n    input.setDocId(UUID.randomUUID().toString()); // or a content hash\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always derive a stable docId (UUID or content hash) upstream.","Make docId a required workflow input.","Confirm the template feeding docId is non-empty."],"tags":["vectordb","indexing","input-validation","non-retryable"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}