{"record":{"id":"c49af244d636b785","repo":"apache/seatunnel","slug":"stripe-option-secret-key-must-not-be-blank","errorCode":null,"errorMessage":"Stripe option 'secret_key' must not be blank","messagePattern":"Stripe option 'secret_key' must not be blank","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"seatunnel-connectors-v2/connector-http/connector-http-stripe/src/main/java/org/apache/seatunnel/connectors/seatunnel/stripe/source/config/StripeSourceParameter.java","lineNumber":45,"sourceCode":"\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\npublic class StripeSourceParameter extends HttpParameter {\n\n    private static final String PAYMENT_INTENTS_PATH = \"/v1/payment_intents\";\n    private static final String AUTHORIZATION = \"Authorization\";\n    private static final String ACCEPT = \"Accept\";\n    private static final String STRIPE_VERSION = \"Stripe-Version\";\n\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        }","sourceCodeStart":27,"sourceCodeEnd":63,"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#L27-L63","documentation":"StripeSourceParameter.buildWithConfig requires a non-blank 'secret_key' and throws IllegalArgumentException when it is null, empty, or whitespace-only. The key is used as the Bearer credential for Stripe API requests.","triggerScenarios":"The job config omits 'secret_key' entirely, sets it to \"\" or only whitespace, or the config source resolves it to null/empty (e.g. an unset placeholder variable).","commonSituations":"Placeholder variables like ${STRIPE_SECRET_KEY} not set in the environment; copy-pasting config templates without filling in credentials; key removed during config sanitization.","solutions":["Set 'secret_key' in the source config to a valid Stripe key (sk_live_... / sk_test_...)","If using a variable placeholder, ensure the env var is actually defined and non-empty","Strip accidental whitespace around the key value"],"exampleFix":"// before\nsecret_key = \"${STRIPE_SECRET_KEY}\"  # env var unset -> empty\n// after (env STRIPE_SECRET_KEY=sk_test_51abc...)\nsecret_key = \"${STRIPE_SECRET_KEY}\"","handlingStrategy":"validation","validationCode":"String key = config.get(\"secret_key\");\nif (key == null || key.trim().isEmpty()) {\n  throw new IllegalArgumentException(\"Stripe source requires non-blank 'secret_key'\");\n}","typeGuard":null,"tryCatchPattern":"try { param.buildWithConfig(pluginConfig); } catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"secret_key\")) { /* set credential and resubmit */ }\n}","preventionTips":["Populate credential placeholders in templates before submission","Keep secret_key values in a secrets manager and inject at runtime","Trim values when generating configs"],"tags":["config-validation","credentials","stripe","api-key"],"backgroundTag":"missing-api-key","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}