mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): Stop reporting to Sentry node parameter value extraction failure (no-changelog) (#7587)
https://n8nio.sentry.io/issues/4595192919
This commit is contained in:
@@ -7,7 +7,7 @@ import type {
|
|||||||
INodeType,
|
INodeType,
|
||||||
NodeParameterValueType,
|
NodeParameterValueType,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
import { NodeOperationError, NodeHelpers, LoggerProxy } from 'n8n-workflow';
|
import { NodeOperationError, NodeHelpers, LoggerProxy, WorkflowOperationError } from 'n8n-workflow';
|
||||||
|
|
||||||
function findPropertyFromParameterName(
|
function findPropertyFromParameterName(
|
||||||
parameterName: string,
|
parameterName: string,
|
||||||
@@ -62,12 +62,12 @@ function executeRegexExtractValue(
|
|||||||
): NodeParameterValueType | object {
|
): NodeParameterValueType | object {
|
||||||
const extracted = regex.exec(value);
|
const extracted = regex.exec(value);
|
||||||
if (!extracted) {
|
if (!extracted) {
|
||||||
throw new Error(
|
throw new WorkflowOperationError(
|
||||||
`ERROR: ${parameterDisplayName} parameter's value is invalid. This is likely because the URL entered is incorrect`,
|
`ERROR: ${parameterDisplayName} parameter's value is invalid. This is likely because the URL entered is incorrect`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (extracted.length < 2 || extracted.length > 2) {
|
if (extracted.length < 2 || extracted.length > 2) {
|
||||||
throw new Error(
|
throw new WorkflowOperationError(
|
||||||
`Property "${parameterName}" has an invalid extractValue regex "${regex.source}". extractValue expects exactly one group to be returned.`,
|
`Property "${parameterName}" has an invalid extractValue regex "${regex.source}". extractValue expects exactly one group to be returned.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user