mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Stop reporting to Sentry NodeApiError outside 500 range (no-changelog) (#7753)
https://n8nio.sentry.io/issues/4312838883 (and many others) Followup to https://github.com/n8n-io/n8n/pull/7662
This commit is contained in:
@@ -357,9 +357,6 @@ export class NodeApiError extends NodeError {
|
|||||||
) {
|
) {
|
||||||
super(node, error);
|
super(node, error);
|
||||||
|
|
||||||
if (severity) this.severity = severity;
|
|
||||||
else if (httpCode?.charAt(0) !== '5') this.severity = 'warning';
|
|
||||||
|
|
||||||
// only for request library error
|
// only for request library error
|
||||||
if (error.error) {
|
if (error.error) {
|
||||||
removeCircularRefs(error.error as JsonObject);
|
removeCircularRefs(error.error as JsonObject);
|
||||||
@@ -401,6 +398,12 @@ export class NodeApiError extends NodeError {
|
|||||||
this.findProperty(error, ERROR_STATUS_PROPERTIES, ERROR_NESTING_PROPERTIES) ?? null;
|
this.findProperty(error, ERROR_STATUS_PROPERTIES, ERROR_NESTING_PROPERTIES) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (severity) {
|
||||||
|
this.severity = severity;
|
||||||
|
} else if (this.httpCode?.charAt(0) !== '5') {
|
||||||
|
this.severity = 'warning';
|
||||||
|
}
|
||||||
|
|
||||||
// set description of this error
|
// set description of this error
|
||||||
if (description) {
|
if (description) {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
|||||||
Reference in New Issue
Block a user