apache/seatunnel · error · IllegalArgumentException

Stripe option 'created_lt' must not be negative

Error message

Stripe option 'created_lt' must not be negative

What it means

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.

Solutions

  1. Set created_lt to a valid non-negative epoch-seconds value for the intended end time.
  2. Remove created_lt if no upper time bound is needed.
  3. Recompute the epoch timestamp correctly (date -d '...' +%s).
  4. Use the current epoch seconds as created_lt instead of a negative sentinel.

Example fix

// before
created_lt = -1
// after
created_lt = 1735689600
Defensive patterns

Strategy: validation

Validate before calling

long lt = pluginConfig.getOptional(StripeSourceOptions.CREATED_LT).orElse(0L);
if (lt < 0) {
    throw new IllegalArgumentException("created_lt must be a non-negative epoch-seconds value");
}

Try / catch

try {
    StripeSourceParameter p = StripeSourceParameter.buildWithConfig(pluginConfig);
} catch (IllegalArgumentException e) {
    throw new IllegalArgumentException("Invalid created_lt: " + e.getMessage(), e);
}

Prevention

When it happens

Trigger: Calling buildWithConfig with pluginConfig providing CREATED_LT as a negative long, e.g. created_lt = -1 or any negative epoch value.

Common situations: User intends 'everything before now' and uses -1 as a sentinel; negative result from a buggy epoch computation; milliseconds/seconds conversion mishap.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

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

        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(
                    "Stripe option 'created_gte' must be less than 'created_lt'");
        }

        this.rateLimitMaxRetries = pluginConfig.get(StripeSourceOptions.RATE_LIMIT_MAX_RETRIES);
        this.rateLimitBackoffMs = pluginConfig.get(StripeSourceOptions.RATE_LIMIT_BACKOFF_MS);
        if (rateLimitMaxRetries < 0) {
            throw new IllegalArgumentException(
                    "Stripe option 'rate_limit_max_retries' must not be negative");
        }
        if (rateLimitBackoffMs < 0) {
            throw new IllegalArgumentException(
                    "Stripe option 'rate_limit_backoff_ms' must not be negative");
        }

        setUrl(trimTrailingSlash(apiBaseUrl.trim()) + PAYMENT_INTENTS_PATH);

View on GitHub (pinned to cf67b549a7)