mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08: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:
parent
2854a0cf46
commit
81f43805aa
|
@ -7,7 +7,7 @@ import type {
|
|||
INodeType,
|
||||
NodeParameterValueType,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError, NodeHelpers, LoggerProxy } from 'n8n-workflow';
|
||||
import { NodeOperationError, NodeHelpers, LoggerProxy, WorkflowOperationError } from 'n8n-workflow';
|
||||
|
||||
function findPropertyFromParameterName(
|
||||
parameterName: string,
|
||||
|
@ -62,12 +62,12 @@ function executeRegexExtractValue(
|
|||
): NodeParameterValueType | object {
|
||||
const extracted = regex.exec(value);
|
||||
if (!extracted) {
|
||||
throw new Error(
|
||||
throw new WorkflowOperationError(
|
||||
`ERROR: ${parameterDisplayName} parameter's value is invalid. This is likely because the URL entered is incorrect`,
|
||||
);
|
||||
}
|
||||
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.`,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue