{"record":{"id":"81971cae970718f8","repo":"apache/seatunnel","slug":"stripe-option-page-size-must-be-between-1-and-10","errorCode":null,"errorMessage":"Stripe option 'page_size' must be between 1 and 100","messagePattern":"Stripe option 'page_size' must be between 1 and 100","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":55,"sourceCode":"\n    private int rateLimitMaxRetries;\n    private int rateLimitBackoffMs;\n\n    @Override\n    public void buildWithConfig(ReadonlyConfig pluginConfig) {\n        String secretKey = pluginConfig.get(StripeSourceOptions.SECRET_KEY);\n        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);","sourceCodeStart":37,"sourceCodeEnd":73,"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#L37-L73","documentation":"StripeSourceParameter.buildWithConfig validates the page_size option when constructing the Stripe source request parameters. page_size controls how many Stripe PaymentIntents records are fetched per page, and Stripe's API only accepts values between 1 and 100. Any configured value outside that range makes the connector fail fast with this IllegalArgumentException instead of sending a request Stripe would reject.","triggerScenarios":"Calling buildWithConfig (directly or via buildParameter/createReader during source reader creation) with pluginConfig where PAGE_SIZE resolves to an integer < 1 or > 100, e.g. page_size = 0, page_size = 500, or a negative number.","commonSituations":"User copies a page_size from a different API's docs; user thinks page_size is a byte/row-count batch size and sets 1000 for throughput; typo in HOCON unit (e.g. page_size = 1000 rows).","solutions":["Set page_size to an integer between 1 and 100 in the source config (100 maximizes throughput per request).","Remove the page_size key so the option default is used instead of an out-of-range value.","If higher throughput is needed, keep page_size <= 100 and increase source parallelism rather than page size.","Check for accidental string-to-int coercion or wrong unit in the config (e.g. page_size = 1000 intending 1000 rows total)."],"exampleFix":"// before\npage_size = 500\n// after\npage_size = 100","handlingStrategy":"validation","validationCode":"int pageSize = pluginConfig.get(StripeSourceOptions.PAGE_SIZE);\nif (pageSize < 1 || pageSize > 100) {\n    throw new IllegalArgumentException(\"page_size must be between 1 and 100, got: \" + pageSize);\n}","typeGuard":null,"tryCatchPattern":"try {\n    StripeSourceParameter p = StripeSourceParameter.buildWithConfig(pluginConfig);\n} catch (IllegalArgumentException e) {\n    // log config key + value, fail job with clear message\n    throw new IllegalArgumentException(\"Invalid Stripe source config: \" + e.getMessage(), e);\n}","preventionTips":["Clamp or validate page_size at config-parse time with Option validators.","Use 100 (Stripe's max) for throughput instead of oversized values.","Add a unit test covering the 1..100 boundary for the config builder."],"tags":["config-validation","range-check","http-connector"],"backgroundTag":"value-out-of-range","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"}