{"record":{"id":"bac7da8c12e92a5b","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-bac7da","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/awsLambdaPlugin/src/main/java/com/external/plugins/AwsLambdaPlugin.java","lineNumber":106,"sourceCode":"                            IllegalArgumentException.class,\n                            e -> new AppsmithPluginException(\n                                    AppsmithPluginError.PLUGIN_ERROR, \"Unsupported command: \" + command))\n                    .onErrorMap(\n                            ResourceNotFoundException.class,\n                            e -> new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, e.getErrorMessage()))\n                    .onErrorMap(\n                            Exception.class,\n                            e -> new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, e.getMessage()))\n                    .map(obj -> obj)\n                    .subscribeOn(Schedulers.boundedElastic());\n        }\n\n        @Override\n        public Mono<TriggerResultDTO> trigger(\n                AWSLambda connection, DatasourceConfiguration datasourceConfiguration, TriggerRequestDTO request) {\n            log.debug(Thread.currentThread().getName() + \": trigger() called for AWS Lambda plugin.\");\n            if (!StringUtils.hasText(request.getRequestType())) {\n                throw new AppsmithPluginException(\n                        AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, \"request type is missing\");\n            }\n\n            String requestType = request.getRequestType();\n            ActionExecutionResult actionExecutionResult;\n            List<Map<String, String>> options;\n            Map<?, Object> params = request.getParameters() == null ? Map.of() : request.getParameters();\n\n            switch (requestType) {\n                case \"FUNCTION_NAMES\" -> {\n                    actionExecutionResult = listFunctions(null, connection);\n                    ArrayNode body = (ArrayNode) actionExecutionResult.getBody();\n                    options = StreamSupport.stream(body.spliterator(), false)\n                            .map(function -> function.get(\"functionName\").asText())\n                            .sorted()\n                            .map(functionName -> Map.of(\"label\", functionName, \"value\", functionName))\n                            .collect(Collectors.toList());\n                }","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/awsLambdaPlugin/src/main/java/com/external/plugins/AwsLambdaPlugin.java#L88-L124","documentation":"Thrown at the top of AwsLambdaPlugin.trigger() when request.getRequestType() is null or blank. The trigger() method powers dynamic dropdown population in the editor (function names, function versions, function aliases). Without a request type the plugin cannot decide which list to fetch, so it refuses early with PLUGIN_EXECUTE_ARGUMENT_ERROR.","triggerScenarios":"trigger() is invoked with a TriggerRequestDTO whose requestType field is null or empty — for example the editor's dropdown refresh fired before a request type was assigned, or a programmatic call that constructed TriggerRequestDTO without calling setRequestType.","commonSituations":"A UI race where the dropdown request omits requestType; programmatic trigger calls that forgot to set the field; a deserialization mismatch where the JSON key for request type does not map to getRequestType().","solutions":["Set request.setRequestType(\"FUNCTION_NAMES\") (or FUNCTION_VERSIONS / FUNCTION_ALIASES) before calling trigger().","If building TriggerRequestDTO from editor parameters, default to FUNCTION_NAMES when no sub-step has been chosen.","Verify the request payload key name matches the TriggerRequestDTO.requestType field exactly."],"exampleFix":"// before\nTriggerRequestDTO request = new TriggerRequestDTO();\n// requestType never set -> error\nplugin.trigger(connection, dsConfig, request);\n\n// after\nTriggerRequestDTO request = new TriggerRequestDTO();\nrequest.setRequestType(\"FUNCTION_NAMES\");\nplugin.trigger(connection, dsConfig, request);","handlingStrategy":"validation","validationCode":"if (!StringUtils.hasText(request.getRequestType())) {\n    throw new IllegalArgumentException(\n        \"TriggerRequestDTO.requestType is required. Use FUNCTION_NAMES, FUNCTION_VERSIONS, or FUNCTION_ALIASES.\");\n}","typeGuard":null,"tryCatchPattern":"plugin.trigger(connection, dsConfig, request)\n    .onErrorResume(AppsmithPluginException.class, e -> {\n        if (\"PE-ARG-5000\".equals(e.getErrorDTO().getAppErrorCode())) {\n            return Mono.just(TriggerResultDTO.empty());\n        }\n        return Mono.error(e);\n    });","preventionTips":["Always call request.setRequestType(...) before invoking trigger().","Default to FUNCTION_NAMES when no sub-step has been chosen.","Verify the request payload key maps to getRequestType() exactly."],"tags":["aws-lambda","trigger","request-validation","dropdown"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}