{"record":{"id":"4e9b25ab23db96be","repo":"apache/seatunnel","slug":"unsupported-packet-mode-s-supported-s","errorCode":null,"errorMessage":"Unsupported packet mode: %s, supported: %s","messagePattern":"Unsupported packet mode: (.+?), 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/EdgeSocketPacketMode.java","lineNumber":59,"sourceCode":"     * Resolve packet mode from config value.\n     *\n     * @param mode configured packet mode string\n     * @return matched packet mode enum\n     */\n    public static EdgeSocketPacketMode from(String mode) {\n        Objects.requireNonNull(mode, \"packetMode must not be null\");\n        String normalized = mode.trim().toLowerCase(Locale.ROOT);\n        for (EdgeSocketPacketMode packetMode : values()) {\n            if (packetMode.getValue().equals(normalized)\n                    || packetMode.name().equalsIgnoreCase(normalized)) {\n                return packetMode;\n            }\n        }\n        String supported =\n                Arrays.stream(values())\n                        .map(EdgeSocketPacketMode::getValue)\n                        .collect(Collectors.joining(\", \"));\n        throw new IllegalArgumentException(\n                \"Unsupported packet mode: \" + mode + \", 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/EdgeSocketPacketMode.java#L41-L63","documentation":"EdgeSocketPacketMode.from() maps the configured packet mode string to its enum. Unknown values throw IllegalArgumentException listing supported modes. Packet mode controls how records are framed in ingress packets, so invalid values are rejected at startup.","triggerScenarios":"EdgeSocketPacketMode.from(mode) invoked with an unsupported mode string (e.g. 'stream', wrong casing, or blank when a value is required).","commonSituations":"Typos in the packet_mode config option, copying packet mode names from a different connector, or blank values left in config templates.","solutions":["Set the packet mode option to one of the supported values listed in the message.","Check trailing whitespace and casing in the config value.","Review the connector docs for the valid packet mode names."],"exampleFix":"// before\npacket_mode = \"stream\"\n// after\npacket_mode = \"record\"","handlingStrategy":"validation","validationCode":"Set<String> valid = Arrays.stream(EdgeSocketPacketMode.values()).map(EdgeSocketPacketMode::getValue).collect(Collectors.toSet());\nif (packetMode == null || !valid.contains(packetMode.trim())) {\n    throw new IllegalArgumentException(\"packet_mode must be one of \" + valid);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the connector docs for supported packet modes before setting packet_mode.","Avoid copying packet_mode values from other connectors.","Fill in config templates fully; never leave packet_mode blank when required."],"tags":["config","enum","connector-edge-socket"],"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"}