appsmithorg/appsmith · error · AppsmithPluginException

PE-ARG-5000

PE-ARG-5000

Error message

Appsmith has found an unexpected query form property - 'Delete Key Value Pair Path'. Please reach out to Appsmith customer support to resolve this.

What it means

In FirestorePlugin.insertFieldValues(). The 'Delete Key Value Pair Path' field uses Firestore FieldValue.delete(), which is only valid inside an UPDATE_DOCUMENT operation. If the method is anything other than UPDATE_DOCUMENT and this field is non-blank, the plugin throws PLUGIN_EXECUTE_ARGUMENT_ERROR.

Source

Thrown at app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java:365

                    || Method.ADD_TO_COLLECTION.equals(method);
        }

        /*
         * - Update mapBody with FieldValue.xyz() values if the FieldValue paths are provided.
         */
        private void insertFieldValues(
                Map<String, Object> mapBody,
                Map<String, Object> formData,
                Method method,
                List<RequestParamDTO> requestParams)
                throws AppsmithPluginException {

            /*
             * - Check that FieldValue.delete() option is only available for UPDATE operation.
             */
            if (!Method.UPDATE_DOCUMENT.equals(method)
                    && !isBlank(PluginUtils.getDataValueSafelyFromFormData(formData, DELETE_KEY_PATH, STRING_TYPE))) {
                throw new AppsmithPluginException(
                        AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                        FirestoreErrorMessages.UNEXPECTED_PROPERTY_DELETE_KEY_PATH_ERROR_MSG);
            }

            /*
             * - Parse delete path.
             */
            if (!isBlank(PluginUtils.getDataValueSafelyFromFormData(formData, DELETE_KEY_PATH, STRING_TYPE))) {
                String deletePaths = PluginUtils.getDataValueSafelyFromFormData(formData, DELETE_KEY_PATH, STRING_TYPE);
                requestParams.add(new RequestParamDTO(DELETE_KEY_PATH, deletePaths, null, null, null));
                List<String> deletePathsList;
                try {
                    deletePathsList = objectMapper.readValue(deletePaths, new TypeReference<List<String>>() {});
                } catch (IOException e) {
                    throw new AppsmithPluginException(
                            AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                            FirestoreErrorMessages.FAILED_TO_PARSE_DELETE_KEY_PATH_ERROR_MSG,
                            e.getMessage());

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Clear the 'Delete Key Value Pair Path' field when the method is not Update Document.
  2. Switch the method back to Update Document if field deletion is actually needed.
  3. When duplicating an Update Document action, clear method-incompatible fields before changing the method.

Example fix

// before — method mismatch
method = Method.GET_DOCUMENT;
formData.put("deleteKeyPath", "[\"field1\"]"); // invalid for GET

// after
dataData.put("deleteKeyPath", ""); // cleared for GET
// or: method = Method.UPDATE_DOCUMENT;
Defensive patterns

Strategy: validation

Validate before calling

String deleteKeyPath = getDataValueSafelyFromFormData(formData, DELETE_KEY_PATH, STRING_TYPE);
if (!Method.UPDATE_DOCUMENT.equals(method) && !isBlank(deleteKeyPath)) {
    throw new IllegalArgumentException(
        "'Delete Key Value Pair Path' is only valid for Update Document.");
}

Type guard

static boolean isDeletePathAllowedForMethod(Method method) {
    return Method.UPDATE_DOCUMENT.equals(method);
}

Prevention

When it happens

Trigger: A Firestore action whose method is Get Single Document, Delete Document, Create Document, or any collection-level method has the 'Delete Key Value Pair Path' field populated.

Common situations: The user switched an action from Update Document to another method but left the delete-path field filled; the action was duplicated from an update action and the method was changed without clearing the field.

Related errors


AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12). Data as JSON: /api/errors/f5c12713f6c7c1d0. Report an issue: GitHub.