{"record":{"id":"eb41b0675ba16360","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-eb41b0","errorCode":"PE-ARG-5000","errorMessage":"request type is missing","messagePattern":"request type is missing","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/AnthropicPlugin.java","lineNumber":261,"sourceCode":"                completionDTO.setModel(model);\n                completionDTO.setCompletion(messageDTO.getFirstMessage());\n                return completionDTO;\n            } catch (IOException e) {\n                throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_JSON_PARSE_ERROR, new String(response));\n            }\n        }\n\n        @Override\n        public Mono<TriggerResultDTO> trigger(\n                APIConnection connection, DatasourceConfiguration datasourceConfiguration, TriggerRequestDTO request) {\n            log.debug(Thread.currentThread().getName() + \": trigger() called for Anthropic plugin.\");\n            final ApiKeyAuth apiKeyAuth = (ApiKeyAuth) datasourceConfiguration.getAuthentication();\n            if (!StringUtils.hasText(apiKeyAuth.getValue())) {\n                return Mono.error(new AppsmithPluginException(\n                        AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR, EMPTY_API_KEY));\n            }\n            if (!StringUtils.hasText(request.getRequestType())) {\n                throw new AppsmithPluginException(\n                        AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, \"request type is missing\");\n            }\n            String requestType = request.getRequestType();\n\n            AnthropicCommand anthropicCommand = AnthropicMethodStrategy.selectTriggerMethod(request, gson);\n            HttpMethod httpMethod = anthropicCommand.getTriggerHTTPMethod();\n            URI uri = anthropicCommand.createTriggerUri();\n\n            TriggerResultDTO triggerResultDTO = triggerResponseCache.getIfPresent(requestType);\n            if (triggerResultDTO != null) {\n                return Mono.just(triggerResultDTO);\n            }\n            return RequestUtils.makeRequest(httpMethod, uri, apiKeyAuth, BodyInserters.empty())\n                    .flatMap(responseEntity -> {\n                        if (responseEntity.getStatusCode().is4xxClientError()) {\n                            return Mono.error(\n                                    new AppsmithPluginException(AppsmithPluginError.PLUGIN_AUTHENTICATION_ERROR));\n                        }","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/AnthropicPlugin.java#L243-L279","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: trigger invoked without requestType\n//   triggerRequest.setRequestType(null);\n// after: set the expected request type\n//   triggerRequest.setRequestType(\"MODELS\"); // or whatever the plugin defines","handlingStrategy":"validation","validationCode":"// Ensure a requestType is set before invoking the trigger\nif (!this.triggerRequest.requestType || !this.triggerRequest.requestType.trim()) {\n  throw new Error('requestType is required for the Anthropic trigger');\n}","typeGuard":"function hasRequestType(r) { return !!r && typeof r.requestType === 'string' && r.requestType.trim().length > 0; }","tryCatchPattern":null,"preventionTips":["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."],"tags":["java","appsmith","anthropic","plugin","argument-validation","trigger","llm"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}