mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(Mailchimp Trigger Node): Fix webhook recreation (#5328)
This commit is contained in:
committed by
GitHub
parent
78bbe2ba27
commit
8f5f1c3aa5
@@ -1,6 +1,6 @@
|
||||
import { validate as jsonSchemaValidate } from 'jsonschema';
|
||||
import type { INode, IPinData, JsonObject } from 'n8n-workflow';
|
||||
import { jsonParse, LoggerProxy, Workflow } from 'n8n-workflow';
|
||||
import { NodeApiError, jsonParse, LoggerProxy, Workflow } from 'n8n-workflow';
|
||||
import type { FindOptionsWhere } from 'typeorm';
|
||||
import { In } from 'typeorm';
|
||||
import pick from 'lodash.pick';
|
||||
@@ -336,8 +336,12 @@ export class WorkflowsService {
|
||||
// Also set it in the returned data
|
||||
updatedWorkflow.active = false;
|
||||
|
||||
let message;
|
||||
if (error instanceof NodeApiError) message = error.description;
|
||||
message = message ?? (error as Error).message;
|
||||
|
||||
// Now return the original error for UI to display
|
||||
throw new ResponseHelper.BadRequestError((error as Error).message);
|
||||
throw new ResponseHelper.BadRequestError(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user