{"record":{"id":"912c70020d548321","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-912c70","errorCode":"PE-ARG-5000","errorMessage":"Query failed to execute because query is not configured.","messagePattern":"Query failed to execute because query is not configured\\.","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/commands/VisionCommand.java","lineNumber":75,"sourceCode":"    @Override\n    public URI createTriggerUri() {\n        return UriComponentsBuilder.fromUriString(CLOUD_SERVICES + MODELS_API)\n                .queryParam(PROVIDER, ANTHROPIC)\n                .queryParam(COMMAND, VISION)\n                .build()\n                .toUri();\n    }\n\n    @Override\n    public URI createExecutionUri() {\n        return RequestUtils.createUriFromCommand(VISION);\n    }\n\n    @Override\n    public AnthropicRequestDTO makeRequestBody(ActionConfiguration actionConfiguration) {\n        Map<String, Object> formData = actionConfiguration.getFormData();\n        if (CollectionUtils.isEmpty(formData)) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n                    String.format(STRING_APPENDER, EXECUTION_FAILURE, QUERY_NOT_CONFIGURED));\n        }\n\n        AnthropicRequestDTO anthropicRequestDTO = new AnthropicRequestDTO();\n        String model = RequestUtils.extractDataFromFormData(formData, VISION_MODEL_SELECTOR);\n        if (!StringUtils.hasText(model)) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,\n                    String.format(STRING_APPENDER, EXECUTION_FAILURE, MODEL_NOT_SELECTED));\n        }\n        Float temperature = getTemperatureFromFormData(formData);\n        anthropicRequestDTO.setTemperature(temperature);\n        anthropicRequestDTO.setModel(model);\n\n        anthropicRequestDTO.setMaxTokens(getMaxTokenFromFormData(formData));\n        anthropicRequestDTO.setMessages(createMessages(formData));\n        if (formData.containsKey(SYSTEM_PROMPT) && formData.get(SYSTEM_PROMPT) != null) {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/commands/VisionCommand.java#L57-L93","documentation":"Identical guard to ChatCommand:140 but in VisionCommand.makeRequestBody — fires when the Vision query's formData is null or empty. Vision uses VISION_MODEL_SELECTOR and accepts image content, but the empty-formData check is the same first gate. Code PE-ARG-5000 (PLUGIN_EXECUTE_ARGUMENT_ERROR).","triggerScenarios":"Running the Anthropic Vision command with an ActionConfiguration whose formData is null or an empty map.","commonSituations":"New vision query run before any field was filled; formData lost during import/migration or programmatic invocation.","solutions":["Configure the Vision query: pick a vision-capable model and add a message before running.","When invoking programmatically, supply a non-empty formData map with model and message entries.","Verify the action was saved with its configuration intact."],"exampleFix":"// before\nActionConfiguration cfg = new ActionConfiguration();\n// formData unset\n// after\nMap<String,Object> formData = new HashMap<>();\nformData.put(\"model\", \"claude-3-5-sonnet\");\nformData.put(\"messages\", Map.of(\"messagesList\", List.of(Map.of(\"role\",\"user\",\"type\",\"text\",\"content\",\"describe this\"))));\ncfg.setFormData(formData);","handlingStrategy":"validation","validationCode":"Map<String, Object> formData = actionConfiguration.getFormData();\nif (CollectionUtils.isEmpty(formData)) {\n    return errorResult(\"Configure the Vision query before running.\");\n}","typeGuard":"boolean isFormDataConfigured(Map<String, Object> formData) {\n    return formData != null && !formData.isEmpty();\n}","tryCatchPattern":"try {\n    visionCommand.makeRequestBody(actionConfiguration);\n} catch (AppsmithPluginException e) {\n    if (e.getAppsmithError() == AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR) {\n        // prompt user to configure the vision query\n    }\n}","preventionTips":["Run vision queries only after model and message fields are set.","Set a non-empty formData when constructing ActionConfiguration.","Smoke-test imported actions to detect dropped formData."],"tags":["anthropic","appsmith","validation","configuration","vision"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}