appsmithorg/appsmith · error · AppsmithPluginException
PE-JSN-4000
PE-JSN-4000
Error message
Plugin failed to parse JSON "{0}" What it means
PLUGIN_JSON_PARSE_ERROR (PE-JSN-4000). The rowObjects string could not be read as a JSON tree (JsonProcessingException from ObjectMapper.readTree). The plugin expected a JSON list of row objects.
Source
Thrown at app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/RowsBulkUpdateMethod.java:87
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_UPDATE_ROW_OBJECTS_MESSAGE,
e.getMessage());
}
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;
}
@Override
public Mono<Object> executePrerequisites(MethodConfig methodConfig, OAuth2 oauth2) {
WebClient client =
WebClientUtils.builder().exchangeStrategies(EXCHANGE_STRATEGIES).build();
final RowsGetMethod rowsGetMethod = new RowsGetMethod(this.objectMapper);
View on GitHub (pinned to 8cd9021c24)
Solutions
- Validate the rowObjects string with a JSON linter before saving the query.
- Prefer building the payload with JSON.stringify(...) in JS rather than hand-writing it.
- Read the ' Error: ...' suffix in the message - it carries the exact Jackson parse error location.
Example fix
// before
{
"rowObjects": "[{rowIndex: 2, name: 'X'},]"
}
// after
{
"rowObjects": "{{ JSON.stringify(Table1.selectedRows.map(r => ({rowIndex: r.__index, name: r.name}))) }}"
} Defensive patterns
Strategy: validation
Validate before calling
ObjectMapper om = new ObjectMapper();
boolean valid;
try { om.readTree(methodConfig.getRowObjects()); valid = true; }
catch (Exception e) { valid = false; } Try / catch
try {
method.validateExecutionMethodRequest(config);
} catch (AppsmithPluginException e) {
if ("PE-JSN-4000".equals(e.getAppsmithError().getCode())) {
// re-prompt user for valid JSON
}
} Prevention
- Build rowObjects with JSON.stringify in JS, never by hand.
- Run the payload through a JSON linter before saving the query.
- Read the trailing 'Error: ...' text for the exact Jackson failure location.
When it happens
Trigger: rowObjects contains malformed JSON - a trailing comma, unquoted keys, single quotes, a stray bracket, or a partial paste that is not complete JSON.
Common situations: User types JSON manually and makes a syntax error; a binding concatenates strings instead of producing JSON; copy-paste from a spreadsheet cell that strips quotes.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/bf6f9d413c7f09dc.
Report an issue: GitHub.