From 6c14907e0f48da59316e7169ab5cbbabf56eb17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 8 Jan 2024 16:56:31 +0100 Subject: [PATCH] fix(core): Avoid wrapping `NodeOperationError` to prevent misreporting to Sentry (no-changelog) `requestWithAuthentication` has calls that may throw `NodeOperationError` but we are wrapping those errors in `NodeApiError`, which is causing those errors to be reported to Sentry even when they are level `warning`. Ref: https://n8nio.sentry.io/issues/4833348705 --- packages/core/src/NodeExecuteFunctions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index 03b84f599ebaa..2a5ad41b004f6 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -1805,6 +1805,8 @@ export async function requestWithAuthentication( } throw error; } catch (error) { + if (error instanceof NodeOperationError) throw error; + throw new NodeApiError(this.getNode(), error); } }