mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-24 11:02:12 -08: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:
parent
6be453b716
commit
0fda8d9aac
|
@ -357,9 +357,6 @@ export class NodeApiError extends NodeError {
|
|||
) {
|
||||
super(node, error);
|
||||
|
||||
if (severity) this.severity = severity;
|
||||
else if (httpCode?.charAt(0) !== '5') this.severity = 'warning';
|
||||
|
||||
// only for request library error
|
||||
if (error.error) {
|
||||
removeCircularRefs(error.error as JsonObject);
|
||||
|
@ -401,6 +398,12 @@ export class NodeApiError extends NodeError {
|
|||
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
|
||||
if (description) {
|
||||
this.description = description;
|
||||
|
|
Loading…
Reference in a new issue