appsmithorg/appsmith · error · AppsmithPluginException
PE-ARG-5000
PE-ARG-5000
Error message
request type is missing
What it means
Thrown by AnthropicPlugin.trigger when request.getRequestType() is null or blank (AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, code PE-ARG-5000, message 'request type is missing'). The trigger flow needs a requestType to select the trigger method and cache the trigger response; an empty value cannot proceed.
Source
Thrown at app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/AnthropicPlugin.java:261
completionDTO.setModel(model);
completionDTO.setCompletion(messageDTO.getFirstMessage());
return completionDTO;
} catch (IOException e) {
throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_JSON_PARSE_ERROR, new String(response));
}
}
@Override
public Mono<TriggerResultDTO> trigger(
APIConnection connection, DatasourceConfiguration datasourceConfiguration, TriggerRequestDTO request) {
log.debug(Thread.currentThread().getName() + ": trigger() called for Anthropic plugin.");
final ApiKeyAuth apiKeyAuth = (ApiKeyAuth) datasourceConfiguration.getAuthentication();
if (!StringUtils.hasText(apiKeyAuth.getValue())) {
return Mono.error(new AppsmithPluginException(
AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR, EMPTY_API_KEY));
}
if (!StringUtils.hasText(request.getRequestType())) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, "request type is missing");
}
String requestType = request.getRequestType();
AnthropicCommand anthropicCommand = AnthropicMethodStrategy.selectTriggerMethod(request, gson);
HttpMethod httpMethod = anthropicCommand.getTriggerHTTPMethod();
URI uri = anthropicCommand.createTriggerUri();
TriggerResultDTO triggerResultDTO = triggerResponseCache.getIfPresent(requestType);
if (triggerResultDTO != null) {
return Mono.just(triggerResultDTO);
}
return RequestUtils.makeRequest(httpMethod, uri, apiKeyAuth, BodyInserters.empty())
.flatMap(responseEntity -> {
if (responseEntity.getStatusCode().is4xxClientError()) {
return Mono.error(
new AppsmithPluginException(AppsmithPluginError.PLUGIN_AUTHENTICATION_ERROR));
}View on GitHub (pinned to 8cd9021c24)
Solutions
- Ensure the trigger call from the UI includes a valid requestType (e.g. the model-list trigger identifier the Anthropic plugin expects).
- Update the Appsmith frontend/plugin to a matching version so the trigger payload is populated correctly.
- If invoking the trigger programmatically, set request.setRequestType(<expected-value>) before calling.
Example fix
// before: trigger invoked without requestType
// triggerRequest.setRequestType(null);
// after: set the expected request type
// triggerRequest.setRequestType("MODELS"); // or whatever the plugin defines Defensive patterns
Strategy: validation
Validate before calling
// Ensure a requestType is set before invoking the trigger
if (!this.triggerRequest.requestType || !this.triggerRequest.requestType.trim()) {
throw new Error('requestType is required for the Anthropic trigger');
} Type guard
function hasRequestType(r) { return !!r && typeof r.requestType === 'string' && r.requestType.trim().length > 0; } Prevention
- Keep the frontend/plugin versions matched so the trigger payload is complete.
- When calling trigger programmatically, always set requestType.
- On UI regressions that drop the field, re-pick the trigger source in the editor.
When it happens
Trigger: A trigger request (e.g. loading model lists for a dropdown) arrives with requestType unset — the TriggerRequestDTO.getRequestType() returns null/empty, failing StringUtils.hasText. This typically stems from the frontend not setting the request type on the trigger call.
Common situations: A plugin/UI version mismatch where the frontend omits requestType; a custom trigger invocation that does not populate the field; a regression in the command editor that drops the request type parameter.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/eb41b0675ba16360.
Report an issue: GitHub.