apache/seatunnel · error · IllegalArgumentException

Conflict between 'body' and dedicated Airtable options for k

Error message

Conflict between 'body' and dedicated Airtable options for keys: %s. Please use either the dedicated option or 'body', not both.

What it means

AirtableSourceParameter.checkBodyConflicts throws IllegalArgumentException when the user sets both the generic 'body' option and a dedicated Airtable option (pageSize, timeZone, userLocale, offset, etc.) that map to the same request keys. The two would silently overwrite each other, so the connector refuses the config up front.

Source

Thrown at seatunnel-connectors-v2/connector-http/connector-http-airtable/src/main/java/org/apache/seatunnel/connectors/seatunnel/airtable/source/config/AirtableSourceParameter.java:155

                pluginConfig, body, AirtableSourceOptions.CELL_FORMAT, "cellFormat", conflicts);
        checkConflict(
                pluginConfig,
                body,
                AirtableSourceOptions.RETURN_FIELDS_BY_FIELD_ID,
                "returnFieldsByFieldId",
                conflicts);
        checkConflict(
                pluginConfig,
                body,
                AirtableSourceOptions.RECORD_METADATA,
                "recordMetadata",
                conflicts);
        checkConflict(pluginConfig, body, AirtableSourceOptions.TIME_ZONE, "timeZone", conflicts);
        checkConflict(
                pluginConfig, body, AirtableSourceOptions.USER_LOCALE, "userLocale", conflicts);
        checkConflict(pluginConfig, body, AirtableSourceOptions.OFFSET, "offset", conflicts);
        if (!conflicts.isEmpty()) {
            throw new IllegalArgumentException(
                    "Conflict between 'body' and dedicated Airtable options for keys: "
                            + String.join(", ", conflicts)
                            + ". Please use either the dedicated option or 'body', not both.");
        }
    }

    private void checkConflict(
            ReadonlyConfig pluginConfig,
            Map<String, Object> body,
            Option<?> option,
            String bodyKey,
            List<String> conflicts) {
        if (pluginConfig.getOptional(option).isPresent() && body.containsKey(bodyKey)) {
            conflicts.add(bodyKey + " (option: " + option.key() + ")");
        }
    }

    private Object parseSort(String sortJson) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Remove the conflicting keys from the 'body' option and keep only the dedicated options (or vice versa).
  2. Move all request parameters into 'body' if you prefer full control, deleting the dedicated options.
  3. Check the key list in the message to see exactly which options collide.

Example fix

// before
body = {pageSize = 100}
pageSize = 50
// after
pageSize = 50
Defensive patterns

Strategy: validation

Validate before calling

// Ensure no key in the body object duplicates a dedicated option
boolean conflict = bodyKeys.stream().anyMatch(Set.of("pageSize","timeZone","userLocale","offset")::contains);

Try / catch

try { createSource(config); } catch (IllegalArgumentException e) { /* message lists conflicting keys */ }

Prevention

When it happens

Trigger: Configuring both e.g. body = {pageSize=100, ...} and a separate pageSize option for the Airtable source; triggered from buildRequestBody during source initialization.

Common situations: Migrating a config from a raw-HTTP style to Airtable-specific options but forgetting to remove overlapping keys from 'body'.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


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