{"record":{"id":"47f9eb5d96bc72d3","repo":"conductor-oss/conductor","slug":"error-getting-task-by-id-s","errorCode":null,"errorMessage":"Error getting task by id: %s","messagePattern":"Error getting task by id: (.+?)","errorType":"exception","errorClass":"TransientException","httpStatus":500,"severity":"error","filePath":"cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java","lineNumber":380,"sourceCode":"                    .map(\n                            row -> {\n                                String taskRow = row.getString(PAYLOAD_KEY);\n                                TaskModel task = readValue(taskRow, TaskModel.class);\n                                recordCassandraDaoRequests(\n                                        \"getTask\", task.getTaskType(), task.getWorkflowType());\n                                recordCassandraDaoPayloadSize(\n                                        \"getTask\",\n                                        taskRow.length(),\n                                        task.getTaskType(),\n                                        task.getWorkflowType());\n                                return task;\n                            })\n                    .orElse(null);\n        } catch (DriverException e) {\n            Monitors.error(CLASS_NAME, \"getTask\");\n            String errorMsg = String.format(\"Error getting task by id: %s\", taskId);\n            LOGGER.error(errorMsg, e);\n            throw new TransientException(errorMsg);\n        }\n    }\n\n    @Override\n    public List<TaskModel> getTasks(List<String> taskIds) {\n        Preconditions.checkNotNull(taskIds);\n        Preconditions.checkArgument(taskIds.size() > 0, \"Task ids list cannot be empty\");\n        String workflowId = lookupWorkflowIdFromTaskId(taskIds.get(0));\n        if (workflowId == null) {\n            return null;\n        }\n        return getWorkflow(workflowId, true).getTasks().stream()\n                .filter(task -> taskIds.contains(task.getTaskId()))\n                .collect(Collectors.toList());\n    }\n\n    /**\n     * This is a dummy implementation and this feature is not implemented for Cassandra backed","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java#L362-L398","documentation":"Thrown by CassandraExecutionDAO.getTask when reading a single task by id fails. DriverException during the workflow/task lookup is wrapped in TransientException (cause not attached). Reports the requested taskId.","triggerScenarios":"Calling getTask(String taskId) when the lookup or workflow read fails — Cassandra unavailable, timeout, or the taskId maps to a workflowId that is not a valid UUID (UUID.fromString inside the path).","commonSituations":"Cassandra connectivity loss. Stale task_lookup row pointing at a non-UUID workflow. Read timeout under load. Schema drift.","solutions":["Verify the taskId exists in task_lookup and maps to a valid UUID workflowId.","Confirm Cassandra health and retry.","Inspect driver logs for the DriverException subtype.","Preserve the cause when rethrowing to aid debugging."],"exampleFix":"// before\nthrow new TransientException(errorMsg);\n\n// after\nthrow new TransientException(errorMsg, e);","handlingStrategy":"retry","validationCode":"// Validate the taskId maps to a UUID workflow before getTask\nString wfId = lookupWorkflowIdFromTaskId(taskId);\nif (wfId == null || !isUuid(wfId)) return null;","typeGuard":"static boolean isUuid(String s) {\n    try { java.util.UUID.fromString(s); return true; } catch (IllegalArgumentException e) { return false; }\n}","tryCatchPattern":"try {\n    return dao.getTask(taskId);\n} catch (TransientException e) {\n    log.warn(\"Transient getTask failure for {}; retrying\", taskId);\n    throw e;","preventionTips":["Validate taskId -> workflowId mapping before read.","Retry TransientException and check Cassandra health.","Attach the cause when rethrowing for better diagnostics."],"tags":["cassandra","task","read","transient","persistence"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}