appsmithorg/appsmith · error · AppsmithPluginException

PE-ARG-5000

PE-ARG-5000

Error message

Query failed to execute because query is not configured.

What it means

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).

Source

Thrown at app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/commands/VisionCommand.java:75

    @Override
    public URI createTriggerUri() {
        return UriComponentsBuilder.fromUriString(CLOUD_SERVICES + MODELS_API)
                .queryParam(PROVIDER, ANTHROPIC)
                .queryParam(COMMAND, VISION)
                .build()
                .toUri();
    }

    @Override
    public URI createExecutionUri() {
        return RequestUtils.createUriFromCommand(VISION);
    }

    @Override
    public AnthropicRequestDTO makeRequestBody(ActionConfiguration actionConfiguration) {
        Map<String, Object> formData = actionConfiguration.getFormData();
        if (CollectionUtils.isEmpty(formData)) {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                    String.format(STRING_APPENDER, EXECUTION_FAILURE, QUERY_NOT_CONFIGURED));
        }

        AnthropicRequestDTO anthropicRequestDTO = new AnthropicRequestDTO();
        String model = RequestUtils.extractDataFromFormData(formData, VISION_MODEL_SELECTOR);
        if (!StringUtils.hasText(model)) {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                    String.format(STRING_APPENDER, EXECUTION_FAILURE, MODEL_NOT_SELECTED));
        }
        Float temperature = getTemperatureFromFormData(formData);
        anthropicRequestDTO.setTemperature(temperature);
        anthropicRequestDTO.setModel(model);

        anthropicRequestDTO.setMaxTokens(getMaxTokenFromFormData(formData));
        anthropicRequestDTO.setMessages(createMessages(formData));
        if (formData.containsKey(SYSTEM_PROMPT) && formData.get(SYSTEM_PROMPT) != null) {

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Configure the Vision query: pick a vision-capable model and add a message before running.
  2. When invoking programmatically, supply a non-empty formData map with model and message entries.
  3. Verify the action was saved with its configuration intact.

Example fix

// before
ActionConfiguration cfg = new ActionConfiguration();
// formData unset
// after
Map<String,Object> formData = new HashMap<>();
formData.put("model", "claude-3-5-sonnet");
formData.put("messages", Map.of("messagesList", List.of(Map.of("role","user","type","text","content","describe this"))));
cfg.setFormData(formData);
Defensive patterns

Strategy: validation

Validate before calling

Map<String, Object> formData = actionConfiguration.getFormData();
if (CollectionUtils.isEmpty(formData)) {
    return errorResult("Configure the Vision query before running.");
}

Type guard

boolean isFormDataConfigured(Map<String, Object> formData) {
    return formData != null && !formData.isEmpty();
}

Try / catch

try {
    visionCommand.makeRequestBody(actionConfiguration);
} catch (AppsmithPluginException e) {
    if (e.getAppsmithError() == AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR) {
        // prompt user to configure the vision query
    }
}

Prevention

When it happens

Trigger: Running the Anthropic Vision command with an ActionConfiguration whose formData is null or an empty map.

Common situations: New vision query run before any field was filled; formData lost during import/migration or programmatic invocation.

Related errors


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