{"record":{"id":"e686d6f498661dbd","repo":"apache/incubator-seata","slug":"cannot-convert-name","errorCode":null,"errorMessage":"Cannot convert {name}","messagePattern":"Cannot convert (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"compatible/src/main/java/io/seata/saga/statelang/domain/ExecutionStatus.java","lineNumber":76,"sourceCode":"    }\n\n    public static ExecutionStatus wrap(org.apache.seata.saga.statelang.domain.ExecutionStatus target) {\n        if (target == null) {\n            return null;\n        }\n        switch (target) {\n            case RU:\n                return RU;\n            case SU:\n                return SU;\n            case FA:\n                return FA;\n            case UN:\n                return UN;\n            case SK:\n                return SK;\n            default:\n                throw new IllegalArgumentException(\"Cannot convert \" + target.name());\n        }\n    }\n\n    public org.apache.seata.saga.statelang.domain.ExecutionStatus unwrap() {\n        switch (this) {\n            case RU:\n                return org.apache.seata.saga.statelang.domain.ExecutionStatus.RU;\n            case SU:\n                return org.apache.seata.saga.statelang.domain.ExecutionStatus.SU;\n            case FA:\n                return org.apache.seata.saga.statelang.domain.ExecutionStatus.FA;\n            case UN:\n                return org.apache.seata.saga.statelang.domain.ExecutionStatus.UN;\n            case SK:\n                return org.apache.seata.saga.statelang.domain.ExecutionStatus.SK;\n            default:\n                throw new IllegalArgumentException(\"Cannot convert \" + this.name());\n        }","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/compatible/src/main/java/io/seata/saga/statelang/domain/ExecutionStatus.java#L58-L94","documentation":"Thrown by the compatible io.seata ExecutionStatus.convert when mapping an org.apache.seata ExecutionStatus back to the legacy enum and the target constant is not one of RU/SU/FA/UN/SK. It guards the compatibility bridge between the two enum hierarchies; an unknown constant means the two builds define different status sets.","triggerScenarios":"Calling ExecutionStatus.convert(target) with an org.apache.seata.saga.statelang.domain.ExecutionStatus constant added in a newer release (or a null/default value not covered by the switch), during saga state-log or API conversion between namespaces.","commonSituations":"io.seata compatible artifact older than the org.apache.seata core on the classpath after a partial upgrade; new ExecutionStatus constant introduced upstream before the compatible module catches up.","solutions":["Match versions: use the compatible module built for the same release as the org.apache.seata core.","Upgrade the io.seata compatible dependency to a version whose convert() knows the new constant.","Avoid mixing namespaces in saga code — stay entirely in org.apache.seata.saga.statelang.domain."],"exampleFix":"<!-- before: mismatched pair -->\n<dependency>\n  <groupId>org.apache.seata</groupId><artifactId>seata-saga-engine</artifactId><version>2.1.0</version>\n</dependency>\n<dependency>\n  <groupId>io.seata</groupId><artifactId>seata-all-compatible</artifactId><version>1.8.0</version>\n</dependency>\n\n<!-- after: aligned release train -->\n<dependency>\n  <groupId>org.apache.seata</groupId><artifactId>seata-saga-engine</artifactId><version>2.1.0</version>\n</dependency>\n<dependency>\n  <groupId>io.seata</groupId><artifactId>seata-all-compatible</artifactId><version>2.1.0</version>\n</dependency>","handlingStrategy":"validation","validationCode":"Set<String> known = Set.of(\"RU\", \"SU\", \"FA\", \"UN\", \"SK\");\nif (!known.contains(target.name())) {\n    throw new IllegalStateException(\n        \"ExecutionStatus.\" + target.name() + \" not convertible by this compatible build; align versions\");\n}\nreturn ExecutionStatus.convert(target);","typeGuard":"boolean isConvertibleExecutionStatus(org.apache.seata.saga.statelang.domain.ExecutionStatus s) {\n    return s != null && Set.of(\"RU\", \"SU\", \"FA\", \"UN\", \"SK\").contains(s.name());\n}","tryCatchPattern":"try {\n    return ExecutionStatus.convert(target);\n} catch (IllegalArgumentException e) {\n    LOGGER.error(\"status {} unknown to compatible layer — version skew\", target);\n    return ExecutionStatus.UN; // fail to 'unknown' rather than crashing the saga engine\n}","preventionTips":["Pin io.seata compatible and org.apache.seata artifacts to the same release version.","For new saga code, stay entirely within org.apache.seata.saga.statelang.domain types.","Check the ExecutionStatus constants of both modules after any Seata upgrade."],"tags":["saga","compatibility","version-mismatch","enum"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}