{"record":{"id":"18b07665c21c021d","repo":"appsmithorg/appsmith","slug":"pe-gsh-5000-18b076","errorCode":"PE-GSH-5000","errorMessage":"Missing a valid response object.","messagePattern":"Missing a valid response object\\.","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/RowsAppendMethod.java","lineNumber":250,"sourceCode":"                    .map(row -> row.getAsSheetValues(\n                            body1.get(0).getValueMap().keySet().toArray(new String[0])))\n                    .collect(Collectors.toList());\n        }\n        final ValueRange valueRange = new ValueRange();\n        valueRange.setMajorDimension(\"ROWS\");\n        valueRange.setRange(range);\n        valueRange.setValues(collect);\n        return webClient\n                .method(HttpMethod.POST)\n                .uri(uriBuilder.build(true).toUri())\n                .body(BodyInserters.fromValue(valueRange));\n    }\n\n    @Override\n    public JsonNode transformExecutionResponse(\n            JsonNode response, MethodConfig methodConfig, Set<String> userAuthorizedSheetIds) {\n        if (response == null) {\n            throw new AppsmithPluginException(\n                    GSheetsPluginError.QUERY_EXECUTION_FAILED, ErrorMessages.MISSING_VALID_RESPONSE_ERROR_MSG);\n        }\n\n        return this.objectMapper.valueToTree(Map.of(\"message\", \"Inserted row successfully!\"));\n    }\n\n    private RowObject getRowObjectFromBody(JsonNode body) {\n\n        if (body.isArray()) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.EXPECTED_ROW_OBJECT_MESSAGE);\n        }\n\n        if (body.isEmpty()) {\n            throw new AppsmithPluginException(\n                    AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, ErrorMessages.EMPTY_ROW_OBJECT_MESSAGE);\n        }\n","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/config/RowsAppendMethod.java#L232-L268","documentation":"Thrown by RowsAppendMethod.transformExecutionResponse when the response argument is null after the Sheets API append call. Code PE-GSH-5000 maps to GSheetsPluginError.QUERY_EXECUTION_FAILED (HTTP 500, '{0}', category 'Query execution error', INTERNAL_ERROR). This is a server-side runtime condition, not a configuration error.","triggerScenarios":"The reactive pipeline delivers a null response to transformExecutionResponse — typically because the upstream exchange produced no body/entity or an intermediate operator returned null. The response == null guard fires MISSING_VALID_RESPONSE_ERROR_MSG.","commonSituations":"Network interruption mid-stream, a WebClient timeout that yielded a null entity, a Sheets API 204/empty body, or a plugin regression. Rare under normal operation.","solutions":["Retry the query once — transient network/empty-response issues often clear.","Check Appsmith server logs for the underlying WebClient/Reactor error around the same timestamp.","Verify OAuth2 token validity and that the spreadsheet is reachable; re-authorize the datasource if expired.","If reproducible, report to Appsmith support with the query JSON and server logs."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Wrap the query trigger and surface null-response failures clearly\ntry {\n    pluginCommand.trigger();\n} catch (AppsmithPluginException e) {\n    if (\"PE-GSH-5000\".equals(e.getAppErrorCode())) {\n        showToast(\"Sheets returned no response. Retry or re-authorize the datasource.\");\n    } else { throw e; }\n}","preventionTips":["Keep the Google Sheets OAuth token valid; re-authorize on expiry.","Monitor server logs for WebClient/Reactor errors.","Retry transient null-response failures once before escalating."],"tags":["google-sheets","appsmith","runtime","response","reactive","internal-error"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}