Skip to content

Commit

Permalink
fix(core): Avoid wrapping NodeOperationError to prevent misreportin…
Browse files Browse the repository at this point in the history
…g 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
  • Loading branch information
ivov committed Jan 8, 2024
1 parent 38d91c4 commit 6c14907
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/NodeExecuteFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,8 @@ export async function requestWithAuthentication(
}
throw error;
} catch (error) {
if (error instanceof NodeOperationError) throw error;

throw new NodeApiError(this.getNode(), error);
}
}
Expand Down

0 comments on commit 6c14907

Please sign in to comment.