apache/seatunnel · critical · IllegalArgumentException

Stripe option 'api_base_url' must not be blank

Error message

Stripe option 'api_base_url' must not be blank

What it means

StripeSourceParameter.buildWithConfig requires a non-blank 'api_base_url' and throws IllegalArgumentException when it is null, empty, or whitespace-only. This base URL is used to build PaymentIntents list requests; unlike secret_key, there is no default, so it must always be provided.

Source

Thrown at seatunnel-connectors-v2/connector-http/connector-http-stripe/src/main/java/org/apache/seatunnel/connectors/seatunnel/stripe/source/config/StripeSourceParameter.java:50

    private static final String PAYMENT_INTENTS_PATH = "/v1/payment_intents";
    private static final String AUTHORIZATION = "Authorization";
    private static final String ACCEPT = "Accept";
    private static final String STRIPE_VERSION = "Stripe-Version";

    private int rateLimitMaxRetries;
    private int rateLimitBackoffMs;

    @Override
    public void buildWithConfig(ReadonlyConfig pluginConfig) {
        String secretKey = pluginConfig.get(StripeSourceOptions.SECRET_KEY);
        if (Strings.isNullOrEmpty(secretKey) || secretKey.trim().isEmpty()) {
            throw new IllegalArgumentException("Stripe option 'secret_key' must not be blank");
        }

        String apiBaseUrl = pluginConfig.get(StripeSourceOptions.API_BASE_URL);
        if (Strings.isNullOrEmpty(apiBaseUrl) || apiBaseUrl.trim().isEmpty()) {
            throw new IllegalArgumentException("Stripe option 'api_base_url' must not be blank");
        }

        int pageSize = pluginConfig.get(StripeSourceOptions.PAGE_SIZE);
        if (pageSize < 1 || pageSize > 100) {
            throw new IllegalArgumentException(
                    "Stripe option 'page_size' must be between 1 and 100");
        }

        Long createdGte = pluginConfig.getOptional(StripeSourceOptions.CREATED_GTE).orElse(null);
        Long createdLt = pluginConfig.getOptional(StripeSourceOptions.CREATED_LT).orElse(null);
        if (createdGte != null && createdGte < 0) {
            throw new IllegalArgumentException("Stripe option 'created_gte' must not be negative");
        }
        if (createdLt != null && createdLt < 0) {
            throw new IllegalArgumentException("Stripe option 'created_lt' must not be negative");
        }
        if (createdGte != null && createdLt != null && createdGte >= createdLt) {
            throw new IllegalArgumentException(

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set 'api_base_url' to "https://api.stripe.com" (or your test/mock base URL) in the source config
  2. Do not leave the option blank; there is no default fallback
  3. Verify no whitespace-only value slipped into the config

Example fix

// before
api_base_url = ""
// after
api_base_url = "https://api.stripe.com"
Defensive patterns

Strategy: validation

Validate before calling

String url = config.get("api_base_url");
if (url == null || url.trim().isEmpty()) {
  throw new IllegalArgumentException("Stripe source requires non-blank 'api_base_url'");
}

Try / catch

try { param.buildWithConfig(pluginConfig); } catch (IllegalArgumentException e) {
  if (e.getMessage().contains("api_base_url")) { /* set https://api.stripe.com and resubmit */ }
}

Prevention

When it happens

Trigger: The job config omits 'api_base_url' or sets it to ""/whitespace; get() returns null when the option is absent.

Common situations: Deleting the option while refactoring configs; template configs with empty values; assuming a default Stripe URL exists when it does not in this connector.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/20af9efac0042db9. Report an issue: GitHub.