{"record":{"id":"ab6fbf160a6d43f9","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-ab6fbf","errorCode":"PE-ARG-5000","errorMessage":"Unsupported command: {command}","messagePattern":"Unsupported command: (.+?)","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/googleAiPlugin/src/main/java/com/external/plugins/utils/RequestUtils.java","lineNumber":49,"sourceCode":"import static com.external.plugins.constants.GoogleAIConstants.MODELS;\n\npublic class RequestUtils {\n\n    private static final WebClient webClient = createWebClient();\n\n    public static String extractDataFromFormData(Map<String, Object> formData, String key) {\n        return (String) ((Map<String, Object>) formData.get(key)).get(GoogleAIConstants.DATA);\n    }\n\n    public static String extractValueFromFormData(Map<String, Object> formData, String key) {\n        return (String) formData.get(key);\n    }\n\n    public static URI createUriFromCommand(String command, String model) {\n        if (GoogleAIConstants.GENERATE_CONTENT.equals(command)) {\n            return URI.create(GOOGLE_AI_API_ENDPOINT + MODELS + \"/\" + model + GENERATE_CONTENT_ACTION);\n        } else {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, \"Unsupported command: \" + command);\n        }\n    }\n\n    public static Mono<ResponseEntity<byte[]>> makeRequest(\n            HttpMethod httpMethod, URI uri, ApiKeyAuth apiKeyAuth, BodyInserter<?, ? super ClientHttpRequest> body) {\n\n        if (!StringUtils.hasText(apiKeyAuth.getValue())) {\n            throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, GoogleAIErrorMessages.EMPTY_API_KEY);\n        }\n\n        return webClient\n                .method(httpMethod)\n                .uri(appendKeyInUri(apiKeyAuth.getValue(), uri))\n                .contentType(MediaType.APPLICATION_JSON)\n                .body(body)\n                .exchangeToMono(clientResponse -> clientResponse.toEntity(byte[].class));\n    }","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/googleAiPlugin/src/main/java/com/external/plugins/utils/RequestUtils.java#L31-L67","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use the supported command: 'generateContent' (GENERATE_CONTENT_MODELS in the trigger, GENERATE_CONTENT in execution).","If you need a different Google AI API endpoint, verify the plugin version supports it — older versions only support generateContent.","Update the plugin to the latest version which may include additional command support.","Check the command value in the error message — if it's a typo or unexpected value, correct the command selection."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate command is supported before execution\nconst SUPPORTED_COMMANDS = ['generateContent'];\nif (!SUPPORTED_COMMANDS.includes(form.command)) {\n  showAlert('Command ' + form.command + ' is not supported. Use generateContent.', 'error');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use the 'generateContent' command which is the sole supported operation.","Update the plugin to check if newer commands have been added.","If extending the plugin, update createUriFromCommand to handle new command types."],"tags":["google-ai","gemini","unsupported-command","uri-construction","appsmith"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}