appsmithorg/appsmith · error · AppsmithPluginException
PE-ARG-5000
PE-ARG-5000
Error message
Query failed to execute because query is not configured.
What it means
Thrown by the Anthropic Chat command's makeRequestBody when the action's formData map is null or empty (CollectionUtils.isEmpty). It is the earliest guard in request building: before any field is read the plugin asserts that the query was actually configured. The message is assembled via STRING_APPENDER ("%s %s") joining EXECUTION_FAILURE ("Query failed to execute because") with QUERY_NOT_CONFIGURED ("query is not configured."). Code PE-ARG-5000 maps to PLUGIN_EXECUTE_ARGUMENT_ERROR.
Source
Thrown at app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/commands/ChatCommand.java:72
@Override
public URI createTriggerUri() {
return UriComponentsBuilder.fromUriString(CLOUD_SERVICES + MODELS_API)
.queryParam(PROVIDER, ANTHROPIC)
.queryParam(COMMAND, CHAT_V2)
.build()
.toUri();
}
@Override
public URI createExecutionUri() {
return RequestUtils.createUriFromCommand(AnthropicConstants.CHAT);
}
@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, CHAT_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));View on GitHub (pinned to 8cd9021c24)
Solutions
- Open the query in the Appsmith editor and fill in at least the model selector and one message before running.
- If invoking programmatically, ensure the ActionConfiguration.formData map is populated with the expected keys (model selector, messages).
- Check that the action was saved after configuration edits and that no import/migration step dropped formData.
Example fix
// before
ActionConfiguration cfg = new ActionConfiguration();
cfg.setFormData(null); // or empty map
// after
Map<String, Object> formData = new HashMap<>();
formData.put("model", "claude-3-5-sonnet");
formData.put("messages", List.of(Map.of("role", "user", "content", "hi")));
cfg.setFormData(formData); Defensive patterns
Strategy: validation
Validate before calling
// Before invoking the Chat command, assert formData is populated
Map<String, Object> formData = actionConfiguration.getFormData();
if (CollectionUtils.isEmpty(formData)) {
// surface a user-facing message instead of triggering PE-ARG-5000
throw new IllegalArgumentException("Configure the query: formData is empty.");
} Type guard
// Java guard: confirm formData is a non-empty map
boolean isFormDataConfigured(Map<String, Object> formData) {
return formData != null && !formData.isEmpty();
} Try / catch
try {
AnthropicRequestDTO dto = chatCommand.makeRequestBody(actionConfiguration);
} catch (AppsmithPluginException e) {
if (e.getAppsmithError() == AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR) {
// prompt user to configure the query
}
} Prevention
- Run a query only after the editor marks all required fields as filled.
- When building ActionConfiguration programmatically, always set a non-empty formData.
- After import/migration, smoke-test actions to catch stripped formData early.
When it happens
Trigger: Calling the Anthropic plugin's Chat command execute path with an ActionConfiguration whose getFormData() returns null or an empty map. This happens when a query/action is saved with no form fields populated, or when the action configuration object is constructed programmatically without formData.
Common situations: Creating a new Anthropic chat query in the Appsmith editor and immediately running it without filling any field; importing/migrating an action whose formData was stripped; programmatically triggering an action via API with an incomplete payload.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/e3da5d091af5b704.
Report an issue: GitHub.