appsmithorg/appsmith · error · AppsmithPluginException

PE-ARG-5000

PE-ARG-5000

Error message

Unsupported command: {command}

What it means

RequestUtils.createUriFromCommand (RequestUtils.java:45-51) throws this when the command parameter does not equal GoogleAIConstants.GENERATE_CONTENT. Currently the Google AI plugin only supports the 'generateContent' command for URI construction. Any other command string triggers this unsupported-command error under PLUGIN_EXECUTE_ARGUMENT_ERROR (PE-ARG-5000). The error message appends the actual command value for diagnostics.

Source

Thrown at app/server/appsmith-plugins/googleAiPlugin/src/main/java/com/external/plugins/utils/RequestUtils.java:49

import static com.external.plugins.constants.GoogleAIConstants.MODELS;

public class RequestUtils {

    private static final WebClient webClient = createWebClient();

    public static String extractDataFromFormData(Map<String, Object> formData, String key) {
        return (String) ((Map<String, Object>) formData.get(key)).get(GoogleAIConstants.DATA);
    }

    public static String extractValueFromFormData(Map<String, Object> formData, String key) {
        return (String) formData.get(key);
    }

    public static URI createUriFromCommand(String command, String model) {
        if (GoogleAIConstants.GENERATE_CONTENT.equals(command)) {
            return URI.create(GOOGLE_AI_API_ENDPOINT + MODELS + "/" + model + GENERATE_CONTENT_ACTION);
        } else {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, "Unsupported command: " + command);
        }
    }

    public static Mono<ResponseEntity<byte[]>> makeRequest(
            HttpMethod httpMethod, URI uri, ApiKeyAuth apiKeyAuth, BodyInserter<?, ? super ClientHttpRequest> body) {

        if (!StringUtils.hasText(apiKeyAuth.getValue())) {
            throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, GoogleAIErrorMessages.EMPTY_API_KEY);
        }

        return webClient
                .method(httpMethod)
                .uri(appendKeyInUri(apiKeyAuth.getValue(), uri))
                .contentType(MediaType.APPLICATION_JSON)
                .body(body)
                .exchangeToMono(clientResponse -> clientResponse.toEntity(byte[].class));
    }

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Use the supported command: 'generateContent' (GENERATE_CONTENT_MODELS in the trigger, GENERATE_CONTENT in execution).
  2. If you need a different Google AI API endpoint, verify the plugin version supports it — older versions only support generateContent.
  3. Update the plugin to the latest version which may include additional command support.
  4. Check the command value in the error message — if it's a typo or unexpected value, correct the command selection.
Defensive patterns

Strategy: validation

Validate before calling

// Validate command is supported before execution
const SUPPORTED_COMMANDS = ['generateContent'];
if (!SUPPORTED_COMMANDS.includes(form.command)) {
  showAlert('Command ' + form.command + ' is not supported. Use generateContent.', 'error');
}

Prevention

When it happens

Trigger: createUriFromCommand is called with a command string other than 'generateContent'. This can happen if GoogleAIMethodStrategy routes an unsupported command type, if a new command constant is added without URI-building support, or if the command value is corrupted/malformed.

Common situations: 1) A new Google AI API command (e.g., streamGenerateContent, countTokens) was added to the command list but createUriFromCommand was not updated to handle it. 2) Command routing logic (GoogleAIMethodStrategy.java:23) maps to a command constant that createUriFromCommand doesn't recognize. 3) Plugin code partially implements a new command — the strategy routes it but the URI builder rejects it.

Related errors


AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12). Data as JSON: /api/errors/ab6fbf160a6d43f9. Report an issue: GitHub.