{"record":{"id":"f5a693b1d672e89a","repo":"apache/seatunnel","slug":"stripe-option-created-gte-must-not-be-negative","errorCode":null,"errorMessage":"Stripe option 'created_gte' must not be negative","messagePattern":"Stripe option 'created_gte' 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":62,"sourceCode":"        if (Strings.isNullOrEmpty(secretKey) || secretKey.trim().isEmpty()) {\n            throw new IllegalArgumentException(\"Stripe option 'secret_key' must not be blank\");\n        }\n\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\");","sourceCodeStart":44,"sourceCodeEnd":80,"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#L44-L80","documentation":"buildWithConfig validates the optional created_gte option, which is passed to Stripe as a lower-bound epoch-seconds filter on PaymentIntents creation time. A negative timestamp is meaningless (dates before 1970), so the connector rejects it with this IllegalArgumentException during config build.","triggerScenarios":"Calling buildWithConfig with pluginConfig providing CREATED_GTE as a negative long, e.g. created_gte = -1000000000, typically via buildParameter or createReader.","commonSituations":"User enters a negative offset intending a relative time ('one year ago'); epoch mistakenly computed with milliseconds vs seconds sign error; placeholder left as -1.","solutions":["Set created_gte to a valid non-negative epoch-seconds value for the intended start time.","Compute the epoch value with a correct tool (e.g. date -d '2024-01-01' +%s on Linux).","Remove created_gte from the config if no lower time bound is needed.","If a relative window is wanted, compute now - N in epoch seconds rather than using a negative literal."],"exampleFix":"// before\ncreated_gte = -1704067200\n// after\ncreated_gte = 1704067200","handlingStrategy":"validation","validationCode":"long gte = pluginConfig.getOptional(StripeSourceOptions.CREATED_GTE).orElse(0L);\nif (gte < 0) {\n    throw new IllegalArgumentException(\"created_gte 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_gte: \" + e.getMessage(), e);\n}","preventionTips":["Compute epoch values with a vetted helper, never hand-written negative offsets.","Document in your config template that created_gte/created_lt are epoch SECONDS.","Sanity-check timestamps against a plausible range (e.g. 2000-2100) before 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"}