{"record":{"id":"6d1db4ae6892f9c0","repo":"apache/seatunnel","slug":"unsupported-encryption-type-s-supported-s","errorCode":null,"errorMessage":"Unsupported encryption type: %s, supported: %s","messagePattern":"Unsupported encryption type: (.+?), supported: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/serialize/EdgeSocketEncryptionType.java","lineNumber":59,"sourceCode":"     * Resolve encryption enum from config/packet value.\n     *\n     * @param value user configured or packet declared encryption string\n     * @return matched encryption type\n     */\n    public static EdgeSocketEncryptionType from(String value) {\n        Objects.requireNonNull(value, \"encryptionType must not be null\");\n        String normalized = value.trim().toLowerCase(Locale.ROOT);\n        for (EdgeSocketEncryptionType encryptionType : values()) {\n            if (encryptionType.getValue().equals(normalized)\n                    || encryptionType.name().equalsIgnoreCase(normalized)) {\n                return encryptionType;\n            }\n        }\n        String supported =\n                Arrays.stream(values())\n                        .map(EdgeSocketEncryptionType::getValue)\n                        .collect(Collectors.joining(\", \"));\n        throw new IllegalArgumentException(\n                \"Unsupported encryption type: \" + value + \", supported: \" + supported);\n    }\n}\n","sourceCodeStart":41,"sourceCodeEnd":63,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/serialize/EdgeSocketEncryptionType.java#L41-L63","documentation":"EdgeSocketEncryptionType.from() converts the configured encryption value into its enum. An unrecognized string results in an IllegalArgumentException enumerating the supported encryption types. This prevents misconfigured encryption from silently disabling packet confidentiality.","triggerScenarios":"EdgeSocketEncryptionType.from(value) called with a value such as 'aes' or 'AES-GCM' instead of the exact supported value (e.g. 'aes_gcm' or 'none').","commonSituations":"Typos in the encryption config option, sender/receiver using different naming conventions for AES-GCM, or values copied from TLS cipher-suite names.","solutions":["Use exactly one of the supported values printed in the message (typically 'none' or 'aes_gcm').","Align the encryption value with the peer's packet encoding settings.","Normalize casing/underscores in the config value."],"exampleFix":"// before\nencryption = \"AES-GCM\"\n// after\nencryption = \"aes_gcm\"","handlingStrategy":"validation","validationCode":"Set<String> valid = Arrays.stream(EdgeSocketEncryptionType.values()).map(EdgeSocketEncryptionType::getValue).collect(Collectors.toSet());\nif (encryption != null && !valid.contains(encryption.trim())) {\n    throw new IllegalArgumentException(\"encryption must be one of \" + valid);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the exact enum values (none / aes_gcm), not TLS cipher-suite names.","Keep producer and consumer encryption configs identical.","Document the chosen value in your config template."],"tags":["config","enum","encryption"],"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-14T11:17:12.474Z"}