appsmithorg/appsmith · error · AppsmithPluginException

PE-JSN-4000

PE-JSN-4000

Error message

Plugin failed to parse JSON "{0}"

What it means

Thrown by RowsBulkAppendMethod.validateExecutionMethodRequest when readTree raises JsonProcessingException — the rowObjects string is non-empty and JSON-like but syntactically broken. Code PE-JSN-4000 (PLUGIN_JSON_PARSE_ERROR, message 'Plugin failed to parse JSON "{0}"', category 'Invalid JSON found', INTERNAL_ERROR). The thrown detail includes the raw input and the appended Jackson error.

Source

Thrown at app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/RowsBulkAppendMethod.java:87

                        ErrorMessages.INVALID_TABLE_HEADER_INDEX,
                        e.getMessage());
            }
        } else {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.INVALID_TABLE_HEADER_INDEX);
        }
        JsonNode bodyNode;
        try {
            bodyNode = this.objectMapper.readTree(methodConfig.getRowObjects());
        } catch (IllegalArgumentException e) {
            if (!StringUtils.hasLength(methodConfig.getRowObjects())) {
                throw new AppsmithPluginException(
                        AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
                        ErrorMessages.EMPTY_ROW_ARRAY_OBJECT_MESSAGE);
            }
            throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, e.getMessage());
        } catch (JsonProcessingException e) {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_JSON_PARSE_ERROR,
                    methodConfig.getRowObjects(),
                    ErrorMessages.EXPECTED_LIST_OF_ROW_OBJECTS_ERROR_MSG + " Error: " + e.getMessage());
        }

        if (!bodyNode.isArray()) {
            throw new AppsmithPluginException(
                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.REQUEST_BODY_NOT_ARRAY);
        }
        return true;
    }

    /**
     * We need to execute this prerequisite even for append, so that we can maintain the column ordering as
     * received from the sheet itself.
     */
    @Override
    public Mono<Object> executePrerequisites(MethodConfig methodConfig, OAuth2 oauth2) {

View on GitHub (pinned to 8cd9021c24)

Solutions

  1. Lint the array JSON and fix the syntax error named in the appended 'Error:' detail.
  2. Bind via JSON.stringify so Appsmith serializes correctly: {{ JSON.stringify([{Name:'Alice'}]) }}.
  3. Use double-quoted keys and remove trailing commas.

Example fix

// before
[{Name: 'Alice',}]   // unquoted keys, trailing comma, single quotes

// after
[{"Name":"Alice"}]
Defensive patterns

Strategy: validation

Validate before calling

// Reject malformed JSON arrays before the plugin parses them
String rowObjects = methodConfig.getRowObjects();
try {
    com.fasterxml.jackson.databind.JsonNode n = objectMapper.readTree(rowObjects);
    if (!n.isArray()) throw new IllegalArgumentException("Expected a JSON array");
} catch (com.fasterxml.jackson.core.JsonProcessingException e) {
    // show e.getMessage() and abort
}

Type guard

boolean isValidJsonArray(ObjectMapper om, String s) {
    try { return om.readTree(s).isArray(); } catch (Exception e) { return false; }
}

Prevention

When it happens

Trigger: A bulk-append row array with JSON syntax errors — unquoted keys, trailing commas, single quotes, mismatched brackets. readTree throws JsonProcessingException and the catch wraps it as PLUGIN_JSON_PARSE_ERROR.

Common situations: Hand-written JSON arrays, template strings that produced broken output, smart-quote paste artifacts.

Understand the failure class

Related errors


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