{"record":{"id":"fa89cd7f92559e4e","repo":"apache/seatunnel","slug":"unknown-encryption-value","errorCode":null,"errorMessage":"Unknown encryption: ${value}","messagePattern":"Unknown encryption: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-transport/src/main/java/org/apache/seatunnel/edge/agent/transport/packet/EdgePacketEncryptionType.java","lineNumber":42,"sourceCode":"    NONE(\"none\"),\n    AES_GCM(\"aes_gcm\");\n\n    private final String value;\n\n    EdgePacketEncryptionType(String value) {\n        this.value = value;\n    }\n\n    public static EdgePacketEncryptionType from(String value) {\n        if (value == null || value.isEmpty()) {\n            return NONE;\n        }\n        for (EdgePacketEncryptionType t : values()) {\n            if (t.value.equalsIgnoreCase(value)) {\n                return t;\n            }\n        }\n        throw new IllegalArgumentException(\"Unknown encryption: \" + value);\n    }\n}\n","sourceCodeStart":24,"sourceCodeEnd":45,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-transport/src/main/java/org/apache/seatunnel/edge/agent/transport/packet/EdgePacketEncryptionType.java#L24-L45","documentation":"EdgePacketEncryptionType.from performs a case-insensitive lookup over its enum constants (e.g. NONE, AES_GCM) and throws IllegalArgumentException when the supplied string matches none of them. It is used while parsing transport.encryption in EdgeTransportConfig.","triggerScenarios":"Setting transport.encryption to a string other than the supported values, e.g. \"aes\", \"aes256-gcm\", \"tls\", or \"AES-GCM\" with a hyphen; case differences are tolerated, wrong spelling/algorithm is not.","commonSituations":"Guessing algorithm names from other libraries; writing \"aes-gcm\" instead of \"aes_gcm\"; a config template from a different project; a version where an encryption mode was renamed or removed.","solutions":["Set transport.encryption to a supported value, e.g. \"none\" or \"aes_gcm\".","Consult EdgePacketEncryptionType for the exact literals accepted by your build.","Replace aliases like \"aes-gcm\"/\"AES256GCM\" with the canonical \"aes_gcm\".","If a previously working value stopped resolving, check whether the agent version renamed the enum constant."],"exampleFix":"// before\ntransport.encryption = \"aes-gcm\"\n\n// after\ntransport.encryption = \"aes_gcm\"","handlingStrategy":"type-guard","validationCode":"String encryption = cfg.getString(\"transport.encryption\");\nSet<String> allowed = Set.of(\"none\", \"aes_gcm\");\nif (!allowed.contains(encryption.trim().toLowerCase(Locale.ROOT))) {\n    throw new IllegalStateException(\"Unsupported transport.encryption: \" + encryption);\n}","typeGuard":"boolean isKnownEncryption(String v) {\n    return v != null && (\"none\".equalsIgnoreCase(v) || \"aes_gcm\".equalsIgnoreCase(v));\n}","tryCatchPattern":"try {\n    EdgePacketEncryptionType type = EdgePacketEncryptionType.from(value);\n} catch (IllegalArgumentException e) {\n    LOG.warn(\"Falling back to none; unknown encryption: \" + value, e);\n    type = EdgePacketEncryptionType.NONE;\n}","preventionTips":["Use the canonical literal \"aes_gcm\" — normalize aliases like \"aes-gcm\" in your config pipeline.","Copy encryption values from the project docs, not from other products.","Validate config files against the enum values in CI before rollout.","When upgrading, diff your config against the new version's accepted values."],"tags":["config","enum","encryption","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}