{"record":{"id":"75d3c9bc1bb75883","repo":"appsmithorg/appsmith","slug":"pe-arg-5000-75d3c9","errorCode":"PE-ARG-5000","errorMessage":"input is not provided","messagePattern":"input is not provided","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/appsmithAiPlugin/src/main/java/com/external/plugins/utils/FieldValidationHelper.java","lineNumber":15,"sourceCode":"package com.external.plugins.utils;\n\nimport com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginError;\nimport com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginException;\nimport org.springframework.util.StringUtils;\n\nimport java.util.List;\nimport java.util.Map;\n\nimport static com.external.plugins.constants.AppsmithAiConstants.INPUT;\n\npublic class FieldValidationHelper {\n    public static void validateTextInput(Map<String, Object> formData, String key) {\n        if (!formData.containsKey(key) || !(formData.get(key) instanceof Map)) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, \"input is not provided\");\n        }\n\n        Map<String, Object> inputMap = (Map<String, Object>) formData.get(key);\n\n        if (!inputMap.containsKey(INPUT)\n                || !StringUtils.hasLength(RequestUtils.extractDataFromFormData(inputMap, INPUT))) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, \"input is not provided\");\n        }\n    }\n\n    public static void validateTextInputAndProperties(\n            Map<String, Object> formData, String key, List<String> properties) {\n        if (!formData.containsKey(key) || !(formData.get(key) instanceof Map)) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, \"input is not provided\");\n        }","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/appsmithAiPlugin/src/main/java/com/external/plugins/utils/FieldValidationHelper.java#L1-L33","documentation":"Thrown by FieldValidationHelper.validateTextInput when formData does not contain the given key or the value at that key is not a Map. It is the structural gate before reading INPUT inside the field. Code PE-ARG-5000 (PLUGIN_EXECUTE_ARGUMENT_ERROR).","triggerScenarios":"An Appsmith AI query whose input field (key) is absent from formData, or whose value is a scalar/list instead of the expected map structure.","commonSituations":"User left the input field empty in the form; formData built manually omitted the field; field key renamed so the lookup misses; value written as a plain string instead of the expected {input: {...}} map.","solutions":["Fill in the input field in the query editor so formData contains the expected key with a map value.","When constructing formData programmatically, provide the field as a map containing an INPUT entry.","Verify the field key matches what the validation helper expects."],"exampleFix":"// before\nformData.put(\"inputText\", \"some text\"); // not a Map -> error\n// after\nformData.put(\"inputText\", Map.of(\"input\", \"some text\"));","handlingStrategy":"validation","validationCode":"if (!formData.containsKey(key) || !(formData.get(key) instanceof Map)) {\n    return errorResult(\"Input is not provided for field: \" + key);\n}","typeGuard":"boolean isInputFieldMap(Map<String, Object> formData, String key) {\n    return formData.containsKey(key) && formData.get(key) instanceof Map;\n}","tryCatchPattern":"try {\n    FieldValidationHelper.validateTextInput(formData, key);\n} catch (AppsmithPluginException e) {\n    if (e.getMessage().equals(\"input is not provided\")) {\n        // prompt user to fill the input field\n    }\n}","preventionTips":["Mark the input field required in the form UI.","Store the field as a map containing an INPUT entry, not a scalar.","Verify the field key spelling when constructing formData."],"tags":["appsmith-ai","appsmith","validation","input","form-data"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}