{"record":{"id":"a29d49288c1c88d7","repo":"kestra-io/kestra","slug":"reindexing-type-is-not-supported","errorCode":null,"errorMessage":"Reindexing type '{}' is not supported","messagePattern":"Reindexing type '(.+?)' is not supported","errorType":"console","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"cli/src/main/java/io/kestra/cli/commands/sys/ReindexCommand.java","lineNumber":48,"sourceCode":"    private String type;\n\n    @Override\n    public Integer call() throws Exception {\n        super.call();\n\n        if (\"flow\".equals(type)) {\n            FlowRepositoryInterface flowRepository = applicationContext.getBean(FlowRepositoryInterface.class);\n            FlowService flowService = applicationContext.getBean(FlowService.class);\n\n            List<Flow> allFlow = flowRepository.findAllForAllTenants();\n            allFlow.stream()\n                .map(flow -> flowRepository.findByIdWithSource(flow.getTenantId(), flow.getNamespace(), flow.getId()).orElse(null))\n                .filter(Objects::nonNull)\n                .forEach(throwConsumer(flow -> flowService.update(GenericFlow.of(flow), flow)));\n\n            stdOut(\"Successfully reindex \" + allFlow.size() + \" flow(s).\");\n        } else {\n            throw new IllegalArgumentException(\"Reindexing type '\" + type + \"' is not supported\");\n        }\n\n        return 0;\n    }\n}\n","sourceCodeStart":30,"sourceCodeEnd":54,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/cli/src/main/java/io/kestra/cli/commands/sys/ReindexCommand.java#L30-L54","documentation":"Thrown by 'kestra sys reindex' when the type argument is not 'flow'. The command only supports reindexing flows; any other type value falls through to an IllegalArgumentException naming the unsupported type. This is a usage/contract error, not a transient failure.","triggerScenarios":"User runs 'kestra sys reindex <type>' where type != \"flow\" (case-sensitive); the else branch throws IllegalArgumentException(\"Reindexing type '<type>' is not supported\").","commonSituations":"Typo in the type (e.g. 'flows' plural, 'executions', 'logs'), wrong casing ('Flow'), or attempting to reindex an entity type that has no CLI reindex path.","solutions":["Use exactly 'flow' as the type: kestra sys reindex flow.","Check 'kestra sys reindex --help' for the list of supported types.","For reindexing other entities (executions, logs), use the dedicated admin/API tooling rather than this command."],"exampleFix":"# before\nkestra sys reindex flows\n# after\nkestra sys reindex flow","handlingStrategy":"validation","validationCode":"if (!\"flow\".equals(type)) {\n  throw new IllegalArgumentException('Unsupported reindex type: ' + type + \". Supported: flow\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use exactly 'flow' as the reindex type.","Run 'kestra sys reindex --help' to list supported types.","Treat the command as flow-only in OSS."],"tags":["cli","sys","reindex","usage","argument-parsing"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}