mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(AWS DynamoDB Node): Improve error handling + add optional GetAll Scan FilterExpression (#3318)
* FilterExpression, ExpressionAttributeValues optional * Returns AWS JSON messages not in response body * 🔨 fixed filterExpression missing in request body * ⚡ linter fixes * Reintroduced 'fix' block at :311 results in duplication * ⚡ lock file fix * ⚡ fix Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
@@ -307,11 +307,13 @@ export class AwsDynamoDB implements INodeType {
|
||||
|
||||
const body: IRequestBody = {
|
||||
TableName: this.getNodeParameter('tableName', i) as string,
|
||||
ExpressionAttributeValues: adjustExpressionAttributeValues(eavUi),
|
||||
};
|
||||
|
||||
if (scan === true) {
|
||||
body['FilterExpression'] = this.getNodeParameter('filterExpression', i) as string;
|
||||
const filterExpression = this.getNodeParameter('filterExpression', i) as string;
|
||||
if (filterExpression) {
|
||||
body['FilterExpression'] = filterExpression;
|
||||
}
|
||||
} else {
|
||||
body['KeyConditionExpression'] = this.getNodeParameter('keyConditionExpression', i) as string;
|
||||
}
|
||||
@@ -332,6 +334,12 @@ export class AwsDynamoDB implements INodeType {
|
||||
body.ExpressionAttributeNames = expressionAttributeName;
|
||||
}
|
||||
|
||||
const expressionAttributeValues = adjustExpressionAttributeValues(eavUi);
|
||||
|
||||
if (Object.keys(expressionAttributeValues).length) {
|
||||
body.ExpressionAttributeValues = expressionAttributeValues;
|
||||
}
|
||||
|
||||
if (indexName) {
|
||||
body.IndexName = indexName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user