{"record":{"id":"a88a6899f6eda6e0","repo":"apache/seatunnel","slug":"unsupported-compression-type-s-supported-s","errorCode":null,"errorMessage":"Unsupported compression type: %s, supported: %s","messagePattern":"Unsupported compression 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/EdgeSocketCompressionType.java","lineNumber":61,"sourceCode":"     * Resolve compression enum from config/packet value.\n     *\n     * @param value user configured or packet declared compression string\n     * @return matched compression type\n     */\n    public static EdgeSocketCompressionType from(String value) {\n        Objects.requireNonNull(value, \"compressionType must not be null\");\n        String normalized = value.trim().toLowerCase(Locale.ROOT);\n        for (EdgeSocketCompressionType compressionType : values()) {\n            if (compressionType.getValue().equals(normalized)\n                    || compressionType.name().equalsIgnoreCase(normalized)) {\n                return compressionType;\n            }\n        }\n        String supported =\n                Arrays.stream(values())\n                        .map(EdgeSocketCompressionType::getValue)\n                        .collect(Collectors.joining(\", \"));\n        throw new IllegalArgumentException(\n                \"Unsupported compression type: \" + value + \", supported: \" + supported);\n    }\n}\n","sourceCodeStart":43,"sourceCodeEnd":65,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-edge-socket/src/main/java/org/apache/seatunnel/connectors/seatunnel/edgesocket/serialize/EdgeSocketCompressionType.java#L43-L65","documentation":"EdgeSocketCompressionType.from() maps the configured compression value to its enum. Unrecognized values cause an IllegalArgumentException listing all supported compression types. It exists to reject invalid compression config before packets are (de)serialized.","triggerScenarios":"EdgeSocketCompressionType.from(value) invoked with a compression string (e.g. 'gzip ' with trailing space, 'Gzip', 'lz4') that matches no enum value.","commonSituations":"Typos in the compression config option, assuming an unsupported codec like zstd or lz4 is available, or mixed-case values.","solutions":["Set the compression config option to one of the values listed in 'supported: ...' (e.g. none, gzip, zlib, deflate).","Use 'none' (or blank) if you do not want compression.","Trim whitespace and fix casing in the config value."],"exampleFix":"// before\ncompression = \"zstd\"\n// after\ncompression = \"gzip\"","handlingStrategy":"validation","validationCode":"Set<String> valid = Arrays.stream(EdgeSocketCompressionType.values()).map(EdgeSocketCompressionType::getValue).collect(Collectors.toSet());\nif (compression != null && !valid.contains(compression.trim())) {\n    throw new IllegalArgumentException(\"compression must be one of \" + valid);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only codecs listed in the error's 'supported' list (none/gzip/zlib/deflate).","Align compression settings with the peer before rollout.","Trim config values and keep consistent casing."],"tags":["config","enum","compression"],"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"}