mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -59,7 +59,7 @@ export async function awsApiRequest(this: IHookFunctions | IExecuteFunctions | I
|
||||
try {
|
||||
return JSON.parse(await this.helpers.request!(options));
|
||||
} catch (error) {
|
||||
const errorMessage = (error.response && error.response.body.message) || (error.response && error.response.body.Message) || error.message;
|
||||
const errorMessage = (error.response && error.response.body && error.response.body.message) || (error.response && error.response.body && error.response.body.Message) || error.message;
|
||||
if (error.statusCode === 403) {
|
||||
if (errorMessage === 'The security token included in the request is invalid.') {
|
||||
throw new Error('The AWS credentials are not valid!');
|
||||
|
||||
Reference in New Issue
Block a user