appsmithorg/appsmith · error · AppsmithPluginException
PE-JSN-4000
PE-JSN-4000
Error message
Plugin failed to parse JSON "{0}" What it means
Thrown by RowsAppendMethod.validateExecutionMethodRequest when objectMapper.readTree throws JsonProcessingException — i.e. the rowObjects string is non-empty, looks like JSON, but is syntactically malformed. Code PE-JSN-4000 maps to PLUGIN_JSON_PARSE_ERROR (message template 'Plugin failed to parse JSON "{0}"', Appsmith category 'Invalid JSON found', INTERNAL_ERROR). The thrown message appends the raw rowObjects and the Jackson parse error.
Source
Thrown at app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/RowsAppendMethod.java:87
} catch (NumberFormatException e) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.INVALID_TABLE_HEADER_INDEX);
}
} 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_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.PARSING_FAILED_EXPECTED_A_ROW_OBJECT_ERROR_MSG + " Error: " + e.getMessage());
}
if (bodyNode.isArray()) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR,
ErrorMessages.EXPECTED_ROW_OBJECT_BUT_FOUND_ARRAY_ERROR_MSG);
}
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 JSON in a linter (jsonlint.com) and fix the syntax error named in the appended 'Error:' detail.
- Use JSON.stringify in a JS binding so Appsmith serializes correctly: {{ JSON.stringify({Name: 'Alice', Age: 30}) }}.
- Quote all keys with double quotes and remove trailing commas.
Example fix
// before
{Name: 'Alice', Age: 30,} // unquoted keys, trailing comma, single quotes
// after
{"Name":"Alice","Age":30} Defensive patterns
Strategy: validation
Validate before calling
// Reject malformed JSON before the plugin sees it
String rowObjects = methodConfig.getRowObjects();
try {
objectMapper.readTree(rowObjects);
} catch (com.fasterxml.jackson.core.JsonProcessingException e) {
// show e.getMessage() to the user and abort the query
} Type guard
boolean isValidJsonObject(ObjectMapper om, String s) {
try {
var n = om.readTree(s);
return n != null && n.isObject();
} catch (Exception e) { return false; }
} Prevention
- Lint JSON in the editor (Appsmith shows parse errors live).
- Prefer JSON.stringify over hand-written JSON in bindings.
- Use double-quoted keys; avoid trailing commas and single quotes.
When it happens
Trigger: Providing a rowObjects string with JSON syntax errors: unquoted keys, trailing commas, single quotes, missing braces, or stray characters. readTree raises JsonProcessingException and the catch wraps it as PLUGIN_JSON_PARSE_ERROR.
Common situations: Hand-typed JSON in the query editor, templated strings that produced malformed output, or copy-paste introducing smart 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/1f3d4d774d40cf21.
Report an issue: GitHub.