{"record":{"id":"4b47c101e88e0db5","repo":"appsmithorg/appsmith","slug":"pe-dyn-5000","errorCode":"PE-DYN-5000","errorMessage":"Error occurred while executing DynamoDB query.","messagePattern":"Error occurred while executing DynamoDB query\\.","errorType":"exception","errorClass":"AppsmithPluginException","httpStatus":500,"severity":"error","filePath":"app/server/appsmith-plugins/dynamoPlugin/src/main/java/com/external/plugins/DynamoPlugin.java","lineNumber":253,"sourceCode":"                        try {\n                            final Method actionExecuteMethod = DynamoDbClient.class.getMethod(\n                                    // Convert `ListTables` to `listTables`, which is the name of the method to execute\n                                    // this action.\n                                    toLowerCamelCase(action), requestClass);\n                            final Object sdkValue = plainToSdk(parameters, requestClass);\n                            final DynamoDbResponse response =\n                                    (DynamoDbResponse) actionExecuteMethod.invoke(ddb, sdkValue);\n                            Object rawResponse = sdkToPlain(response);\n                            Object transformedResponse =\n                                    getTransformedResponse((Map<String, Object>) rawResponse, action);\n                            result.setBody(transformedResponse);\n                        } catch (InvocationTargetException\n                                | IllegalAccessException\n                                | NoSuchMethodException\n                                | ClassNotFoundException e) {\n                            final String errorMessage = (e.getCause() == null ? e : e.getCause()).getMessage();\n                            log.warn(\"Error executing the DynamoDB Action: {}\", errorMessage, e);\n                            throw new AppsmithPluginException(\n                                    DynamoPluginError.QUERY_EXECUTION_FAILED,\n                                    DynamoErrorMessages.QUERY_EXECUTION_FAILED_ERROR_MSG,\n                                    errorMessage);\n                        }\n\n                        result.setIsExecutionSuccess(true);\n                        return result;\n                    })\n                    .onErrorResume(error -> {\n                        ActionExecutionResult result = new ActionExecutionResult();\n                        result.setIsExecutionSuccess(false);\n                        if (!(error instanceof AppsmithPluginException)) {\n                            error = new AppsmithPluginException(\n                                    DynamoPluginError.QUERY_EXECUTION_FAILED,\n                                    DynamoErrorMessages.QUERY_EXECUTION_FAILED_ERROR_MSG,\n                                    error.getMessage());\n                        }\n                        result.setErrorInfo(error);","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/server/appsmith-plugins/dynamoPlugin/src/main/java/com/external/plugins/DynamoPlugin.java#L235-L271","documentation":"A catch-all around the reflection-based invocation of the DynamoDB client method. It catches InvocationTargetException, IllegalAccessException, NoSuchMethodException, and ClassNotFoundException, and wraps them in DynamoPluginError.QUERY_EXECUTION_FAILED (PE-DYN-5000). The downstream cause message (e.getCause() if present, else e itself) is included so the specific AWS error is visible.","triggerScenarios":"The DynamoDB SDK method invocation fails at runtime — invalid parameter values, missing required fields that the SDK validates, an AWS service-side error (AccessDeniedException, ResourceNotFoundException, ProvisionedThroughputExceededException), or a method-signature mismatch with the bundled SDK.","commonSituations":"Missing required fields like TableName or Key; IAM permissions insufficient for the action; AWS throttling or capacity errors; SDK version incompatibility causing NoSuchMethodException; invalid attribute value types that the SDK rejects.","solutions":["Read the downstream error message in the exception cause — it usually names the specific AWS error code (e.g. AccessDeniedException, ValidationException).","Verify all required fields for the DynamoDB action are present and correctly typed in the JSON body.","Check IAM permissions and AWS credentials for the action being attempted.","If the cause mentions NoSuchMethodException or a signature problem, ensure the action name and SDK version are compatible.","For throughput errors, retry with exponential backoff or increase capacity."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"plugin.execute(actionConfiguration, dsConfig)\n    .onErrorResume(AppsmithPluginException.class, e -> {\n        if (\"PE-DYN-5000\".equals(e.getErrorDTO().getAppErrorCode())) {\n            String downstream = e.getErrorDTO().getDownstreamErrorMessage();\n            log.warn(\"DynamoDB query failed downstream: {}\", downstream);\n            // surface the AWS cause to the user, optionally retry on throughput errors\n            return Mono.just(errorResult(downstream));\n        }\n        return Mono.error(e);\n    });","preventionTips":["Always inspect the downstream error message (the AWS cause) to find the real failure reason.","Verify all required fields (TableName, Key, etc.) for the action before executing.","Confirm IAM permissions cover the specific DynamoDB action.","For throughput errors, implement retry with exponential backoff."],"tags":["dynamodb","query-execution","reflection","downstream-error","pe-dyn-5000"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}