{"record":{"id":"bc3d085d30751035","repo":"apache/seatunnel","slug":"stripe-option-created-lt-must-not-be-negative","errorCode":null,"errorMessage":"Stripe option 'created_lt' must not be negative","messagePattern":"Stripe option 'created_lt' must not be negative","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-http/connector-http-stripe/src/main/java/org/apache/seatunnel/connectors/seatunnel/stripe/source/config/StripeSourceParameter.java","lineNumber":65,"sourceCode":"\n        String apiBaseUrl = pluginConfig.get(StripeSourceOptions.API_BASE_URL);\n        if (Strings.isNullOrEmpty(apiBaseUrl) || apiBaseUrl.trim().isEmpty()) {\n            throw new IllegalArgumentException(\"Stripe option 'api_base_url' must not be blank\");\n        }\n\n        int pageSize = pluginConfig.get(StripeSourceOptions.PAGE_SIZE);\n        if (pageSize < 1 || pageSize > 100) {\n            throw new IllegalArgumentException(\n                    \"Stripe option 'page_size' must be between 1 and 100\");\n        }\n\n        Long createdGte = pluginConfig.getOptional(StripeSourceOptions.CREATED_GTE).orElse(null);\n        Long createdLt = pluginConfig.getOptional(StripeSourceOptions.CREATED_LT).orElse(null);\n        if (createdGte != null && createdGte < 0) {\n            throw new IllegalArgumentException(\"Stripe option 'created_gte' must not be negative\");\n        }\n        if (createdLt != null && createdLt < 0) {\n            throw new IllegalArgumentException(\"Stripe option 'created_lt' must not be negative\");\n        }\n        if (createdGte != null && createdLt != null && createdGte >= createdLt) {\n            throw new IllegalArgumentException(\n                    \"Stripe option 'created_gte' must be less than 'created_lt'\");\n        }\n\n        this.rateLimitMaxRetries = pluginConfig.get(StripeSourceOptions.RATE_LIMIT_MAX_RETRIES);\n        this.rateLimitBackoffMs = pluginConfig.get(StripeSourceOptions.RATE_LIMIT_BACKOFF_MS);\n        if (rateLimitMaxRetries < 0) {\n            throw new IllegalArgumentException(\n                    \"Stripe option 'rate_limit_max_retries' must not be negative\");\n        }\n        if (rateLimitBackoffMs < 0) {\n            throw new IllegalArgumentException(\n                    \"Stripe option 'rate_limit_backoff_ms' must not be negative\");\n        }\n\n        setUrl(trimTrailingSlash(apiBaseUrl.trim()) + PAYMENT_INTENTS_PATH);","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-http/connector-http-stripe/src/main/java/org/apache/seatunnel/connectors/seatunnel/stripe/source/config/StripeSourceParameter.java#L47-L83","documentation":"buildWithConfig validates the optional created_lt option, Stripe's exclusive upper-bound epoch-seconds filter on PaymentIntents creation time. Negative values are invalid (pre-1970), so the connector throws this IllegalArgumentException while building the source parameters.","triggerScenarios":"Calling buildWithConfig with pluginConfig providing CREATED_LT as a negative long, e.g. created_lt = -1 or any negative epoch value.","commonSituations":"User intends 'everything before now' and uses -1 as a sentinel; negative result from a buggy epoch computation; milliseconds/seconds conversion mishap.","solutions":["Set created_lt to a valid non-negative epoch-seconds value for the intended end time.","Remove created_lt if no upper time bound is needed.","Recompute the epoch timestamp correctly (date -d '...' +%s).","Use the current epoch seconds as created_lt instead of a negative sentinel."],"exampleFix":"// before\ncreated_lt = -1\n// after\ncreated_lt = 1735689600","handlingStrategy":"validation","validationCode":"long lt = pluginConfig.getOptional(StripeSourceOptions.CREATED_LT).orElse(0L);\nif (lt < 0) {\n    throw new IllegalArgumentException(\"created_lt must be a non-negative epoch-seconds value\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    StripeSourceParameter p = StripeSourceParameter.buildWithConfig(pluginConfig);\n} catch (IllegalArgumentException e) {\n    throw new IllegalArgumentException(\"Invalid created_lt: \" + e.getMessage(), e);\n}","preventionTips":["Avoid -1/-2 sentinel values; omit the option entirely for unbounded windows.","Use date -d '...' +%s (or equivalent) to generate timestamps.","Validate timestamps fall in a plausible epoch range before job submission."],"tags":["config-validation","timestamp","range-check"],"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-23T08:17:48.524Z"}