{"record":{"id":"bc0275e420466bd8","repo":"apache/seatunnel","slug":"illegal-config-argument","errorCode":"ILLEGAL_CONFIG_ARGUMENT","errorMessage":"Option 'host' must not be empty","messagePattern":"Option 'host' must not be empty","errorType":"validation","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphConnectionConfig.java","lineNumber":75,"sourceCode":"        config.getOptional(HugeGraphOptions.PASSWORD).ifPresent(connectionConfig::setPassword);\n        connectionConfig.setMaxRetries(\n                config.getOptional(HugeGraphOptions.MAX_RETRIES)\n                        .orElse(HugeGraphOptions.MAX_RETRIES.defaultValue()));\n        connectionConfig.setRetryBackoffMs(\n                config.getOptional(HugeGraphOptions.RETRY_BACKOFF_MS)\n                        .orElse(HugeGraphOptions.RETRY_BACKOFF_MS.defaultValue()));\n        connectionConfig.setRetryBackoffMaxMs(\n                config.getOptional(HugeGraphOptions.RETRY_BACKOFF_MAX_MS)\n                        .orElse(HugeGraphOptions.RETRY_BACKOFF_MAX_MS.defaultValue()));\n        validate(connectionConfig);\n        return connectionConfig;\n    }\n\n    private static void validate(HugeGraphConnectionConfig config) {\n        // Fail fast at config-load with the offending option name, so the job stops before opening\n        // a client that would otherwise surface a generic connection error much later.\n        if (isBlank(config.getHost())) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    \"Option 'host' must not be empty\");\n        }\n        if (isBlank(config.getGraphName())) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    \"Option 'graph_name' must not be empty\");\n        }\n        // graph_space is not validated for emptiness: it carries a non-empty default (\"DEFAULT\"),\n        // HugeGraphConnectionConfig.of() coalesces blank values to that default, and\n        // HugeGraphClient additionally falls back to \"DEFAULT\" for any null — so it can never be\n        // empty here.\n        if (config.getPort() < 1 || config.getPort() > 65535) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\n                            \"Option 'port' must be in range [1, 65535], but got %s\",\n                            config.getPort()));","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphConnectionConfig.java#L57-L93","documentation":"HugeGraphConnectionConfig.validate() fails fast at config-load time when the 'host' option is blank, throwing ILLEGAL_CONFIG_ARGUMENT. This prevents the job from opening a client that would only fail later with a generic connection error.","triggerScenarios":"Building a HugeGraphConnectionConfig via of() with host = \"\" , host = null, or a whitespace-only value in the connector options.","commonSituations":"Omitting the host key entirely in the SeaTunnel config HOCON block, leaving it as an empty string after templating/environment substitution failed, or copy-pasting a config where host was commented out.","solutions":["Set a valid host value, e.g. host = \"127.0.0.1\" or your HugeGraph server hostname.","Check that environment variable / placeholder substitution (e.g. ${HOST}) actually resolves — an unexpanded or empty variable yields a blank host.","Confirm the option key spelling is 'host' in the sink/source config block."],"exampleFix":"// before\nHugeGraph {\n  host = \"\"\n  graph_name = \"graph1\"\n}\n// after\nHugeGraph {\n  host = \"hugegraph-server\"\n  graph_name = \"graph1\"\n}","handlingStrategy":"validation","validationCode":"if (host == null || host.trim().isEmpty()) { throw new IllegalArgumentException(\"Option 'host' must not be empty\"); }","typeGuard":null,"tryCatchPattern":"// try { HugeGraphConnectionConfig.of(opts); } catch (HugeGraphConnectorException e) {\n//   if (e.getMessage().contains(\"Option 'host'\")) { /* fail fast with clear message */ } }","preventionTips":["Always set host explicitly in the connector block","Test env-var/placeholder substitution in CI before deploying","Keep a canonical job-config template with all required keys filled"],"tags":["hugegraph","config","validation"],"backgroundTag":"empty-required-field","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}