{"record":{"id":"f9d84de011a971b1","repo":"apache/seatunnel","slug":"option-must-be-greater-than-zero","errorCode":null,"errorMessage":"${option} must be greater than zero","messagePattern":"(.+?) must be greater than zero","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/config/DeepLakeSinkConfig.java","lineNumber":84,"sourceCode":"        if (value == null) {\n            return null;\n        }\n        int end = value.length();\n        while (end > 0 && value.charAt(end - 1) == '/') {\n            end--;\n        }\n        return value.substring(0, end);\n    }\n\n    private static void requireNonBlank(String value, String option) {\n        if (value == null || value.trim().isEmpty()) {\n            throw new IllegalArgumentException(option + \" must not be blank\");\n        }\n    }\n\n    private static void requirePositive(int value, String option) {\n        if (value <= 0) {\n            throw new IllegalArgumentException(option + \" must be greater than zero\");\n        }\n    }\n\n    public String getApiUrl() {\n        return apiUrl;\n    }\n\n    public String getApiKey() {\n        return apiKey;\n    }\n\n    public String getOrgId() {\n        return orgId;\n    }\n\n    public String getWorkspace() {\n        return workspace;\n    }","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/config/DeepLakeSinkConfig.java#L66-L102","documentation":"DeepLakeSinkConfig.requirePositive validates numeric options (batch_size, connect_timeout_ms, socket_timeout_ms) and throws IllegalArgumentException('<option> must be greater than zero') when the value is <= 0, guaranteeing the HTTP client and batching logic receive sane parameters.","triggerScenarios":"Configuring batch_size, connect_timeout_ms, or socket_timeout_ms with 0 or a negative number in the Deep Lake sink options.","commonSituations":"Setting a timeout to 0 thinking it means 'no timeout'; templated config arithmetic evaluating to 0; unit mistakes (seconds vs ms) producing tiny or negative values.","solutions":["Set the reported option to a positive integer (e.g. batch_size = 100, connect_timeout_ms = 60000)","Remove the option to fall back to the documented default instead of forcing 0","Fix templated config expressions that evaluate to zero"],"exampleFix":"// before\nsocket_timeout_ms = 0\n// after\nsocket_timeout_ms = 120000","handlingStrategy":"validation","validationCode":"for (String k : java.util.List.of(\"batch_size\",\"connect_timeout_ms\",\"socket_timeout_ms\")) {\n  int v = config.getInt(k, 1);\n  if (v <= 0) throw new IllegalStateException(k + \" must be > 0\");\n}","typeGuard":null,"tryCatchPattern":"try { new DeepLakeSinkConfig(options); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"must be greater than zero\")) log.error(\"Bad numeric option: {}\", e.getMessage()); throw e; }","preventionTips":["Keep numeric options positive; omit them to use defaults","Watch for 0-vs-default confusion in timeout settings","Sanity-check templated arithmetic in generated configs"],"tags":["deeplake","config","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}