conductor-oss/conductor · error · IllegalArgumentException

Invalid input - Operation: %s, PayloadType: %s

Error message

Invalid input - Operation: %s, PayloadType: %s

What it means

Thrown by ExecutionService.getExternalStorageLocation when the 'operation' or 'type' string parameters cannot be mapped to valid ExternalPayloadStorage.Operation (READ, WRITE) or PayloadType (WORKFLOW_INPUT, WORKFLOW_OUTPUT, TASK_INPUT, TASK_OUTPUT) enum values via valueOf. The method uppercases the input and attempts enum conversion; any failure is wrapped in IllegalArgumentException. Also thrown if externalPayloadStorage.getLocation itself throws.

Source

Thrown at core/src/main/java/com/netflix/conductor/service/ExecutionService.java:712

     * @param path the path for which the external storage location is to be populated
     * @param operation the type of {@link Operation} to be performed
     * @param type the {@link PayloadType} at the external uri
     * @return the external uri at which the payload is stored/to be stored
     */
    public ExternalStorageLocation getExternalStorageLocation(
            String path, String operation, String type) {
        try {
            ExternalPayloadStorage.Operation payloadOperation =
                    ExternalPayloadStorage.Operation.valueOf(StringUtils.upperCase(operation));
            ExternalPayloadStorage.PayloadType payloadType =
                    ExternalPayloadStorage.PayloadType.valueOf(StringUtils.upperCase(type));
            return externalPayloadStorage.getLocation(payloadOperation, payloadType, path);
        } catch (Exception e) {
            String errorMsg =
                    String.format(
                            "Invalid input - Operation: %s, PayloadType: %s", operation, type);
            LOGGER.error(errorMsg);
            throw new IllegalArgumentException(errorMsg);
        }
    }
}

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Use valid operation values: 'READ' or 'WRITE' (case-insensitive).
  2. Use valid payload type values: 'WORKFLOW_INPUT', 'WORKFLOW_OUTPUT', 'TASK_INPUT', 'TASK_OUTPUT' (case-insensitive).
  3. Check the API documentation or ExternalPayloadStorage interface for the complete enum set before constructing the request.

Example fix

// before — invalid operation and type
GET /api/external-storage/location?path=/foo&operation=delete&type=input
// 400: Invalid input - Operation: delete, PayloadType: input

// after — valid values
GET /api/external-storage/location?path=/foo&operation=WRITE&type=TASK_INPUT
Defensive patterns

Strategy: validation

Validate before calling

// Validate operation and type strings before calling getExternalStorageLocation
private static final Set<String> VALID_OPERATIONS = Set.of("READ", "WRITE");
private static final Set<String> VALID_PAYLOAD_TYPES =
    Set.of("WORKFLOW_INPUT", "WORKFLOW_OUTPUT", "TASK_INPUT", "TASK_OUTPUT");

String op = operation.toUpperCase();
String pt = type.toUpperCase();
if (!VALID_OPERATIONS.contains(op)) {
    throw new IllegalArgumentException("Invalid operation: " + operation
        + ". Valid: READ, WRITE");
}
if (!VALID_PAYLOAD_TYPES.contains(pt)) {
    throw new IllegalArgumentException("Invalid payload type: " + type
        + ". Valid: " + VALID_PAYLOAD_TYPES);
}

Type guard

public static boolean isValidStorageOperation(String op) {
    return Set.of("READ", "WRITE").contains(op.toUpperCase());
}

public static boolean isValidPayloadType(String type) {
    return Set.of("WORKFLOW_INPUT", "WORKFLOW_OUTPUT", "TASK_INPUT", "TASK_OUTPUT")
        .contains(type.toUpperCase());
}

Prevention

When it happens

Trigger: Calling the external storage location API (GET /api/external-storage/location) or the service method with an invalid operation string (e.g. 'DELETE', 'COPY', 'delete') or an invalid payload type string (e.g. 'TASK_STATUS', 'WORKFLOW_STATUS', 'input'). Case is handled (uppercased) but the resulting string must match a valid enum constant.

Common situations: Passing an unsupported operation like 'DELETE' or 'COPY' — only READ and WRITE are supported. Passing a payload type like 'INPUT' instead of 'TASK_INPUT' or 'WORKFLOW_INPUT'. Typo in the query parameter. Client SDK using a different naming convention than the server's enum constants.

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/0efeb62c38d6d79f. Report an issue: GitHub.