feat: Do not show errors not processed by n8n (no-changelog) (#9598)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Michael Kret
2024-06-20 08:45:00 +03:00
committed by GitHub
parent 4740162232
commit b7aea957b8
317 changed files with 471 additions and 454 deletions

View File

@@ -142,7 +142,7 @@ export class MongoDb implements INodeType {
returnData.push({ json: entry, pairedItem: fallbackPairedItems ?? [{ item: i }] });
}
} catch (error) {
if (this.continueOnFail()) {
if (this.continueOnFail(error)) {
returnData.push({
json: { error: (error as JsonObject).message },
pairedItem: fallbackPairedItems ?? [{ item: i }],
@@ -166,7 +166,7 @@ export class MongoDb implements INodeType {
pairedItem: fallbackPairedItems ?? [{ item: i }],
});
} catch (error) {
if (this.continueOnFail()) {
if (this.continueOnFail(error)) {
returnData.push({
json: { error: (error as JsonObject).message },
pairedItem: fallbackPairedItems ?? [{ item: i }],
@@ -214,7 +214,7 @@ export class MongoDb implements INodeType {
returnData.push({ json: entry, pairedItem: fallbackPairedItems ?? [{ item: i }] });
}
} catch (error) {
if (this.continueOnFail()) {
if (this.continueOnFail(error)) {
returnData.push({
json: { error: (error as JsonObject).message },
pairedItem: fallbackPairedItems ?? [{ item: i }],
@@ -254,7 +254,7 @@ export class MongoDb implements INodeType {
.collection(this.getNodeParameter('collection', 0) as string)
.findOneAndReplace(filter, item, updateOptions as FindOneAndReplaceOptions);
} catch (error) {
if (this.continueOnFail()) {
if (this.continueOnFail(error)) {
item.json = { error: (error as JsonObject).message };
continue;
}
@@ -296,7 +296,7 @@ export class MongoDb implements INodeType {
.collection(this.getNodeParameter('collection', 0) as string)
.findOneAndUpdate(filter, { $set: item }, updateOptions as FindOneAndUpdateOptions);
} catch (error) {
if (this.continueOnFail()) {
if (this.continueOnFail(error)) {
item.json = { error: (error as JsonObject).message };
continue;
}
@@ -335,7 +335,7 @@ export class MongoDb implements INodeType {
});
}
} catch (error) {
if (this.continueOnFail()) {
if (this.continueOnFail(error)) {
responseData = [{ error: (error as JsonObject).message }];
} else {
throw error;
@@ -376,7 +376,7 @@ export class MongoDb implements INodeType {
.collection(this.getNodeParameter('collection', 0) as string)
.updateOne(filter, { $set: item }, updateOptions as UpdateOptions);
} catch (error) {
if (this.continueOnFail()) {
if (this.continueOnFail(error)) {
item.json = { error: (error as JsonObject).message };
continue;
}