kopia lustrzana https://github.com/c9/core
make sure we do not flood raygun with errors
rodzic
803c4ccf4a
commit
29d1e1da17
|
@ -1419,12 +1419,13 @@ window.TraceKit = TraceKit;
|
||||||
}
|
}
|
||||||
|
|
||||||
var blackListedErrors = {
|
var blackListedErrors = {
|
||||||
'Error with empty message': {},
|
count: 0,
|
||||||
'Script error.': {},
|
'#Error with empty message': {},
|
||||||
'DealPly is not defined': { factor: 10e5 },
|
'#Script error.': {},
|
||||||
"Cannot read property 'style' of null": { factor: 10e3 },
|
'#DealPly is not defined': { factor: 10e5 },
|
||||||
"Project with id '<id>' does not exist": { factor: 10e2 },
|
"#Cannot read property 'style' of null": { factor: 10e3 },
|
||||||
"Workspace not found": { factor: 10e2 },
|
"#Project with id '<id>' does not exist": { factor: 10e2 },
|
||||||
|
"#Workspace not found": { factor: 10e2 },
|
||||||
};
|
};
|
||||||
var groupedErrors = [{
|
var groupedErrors = [{
|
||||||
regex: /^((?:Project|User) with id ')(\d+)(' does not exist)/i,
|
regex: /^((?:Project|User) with id ')(\d+)(' does not exist)/i,
|
||||||
|
@ -1511,13 +1512,16 @@ window.TraceKit = TraceKit;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (blackListedErrors.hasOwnProperty(message)) {
|
var blackListEntry = blackListedErrors["#" + message];
|
||||||
var count = (blackListedErrors[message].count || 0) + 1;
|
if (blackListEntry) {
|
||||||
blackListedErrors[message].count = count;
|
var count = (blackListEntry.count || 0) + 1;
|
||||||
if (count % (blackListedErrors[message].factor || 10) !== 1) {
|
blackListEntry.count = count;
|
||||||
|
if (count % (blackListEntry.factor || 10) !== 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
finalCustomData.$blackList = blackListedErrors[message];
|
finalCustomData.$blackList = blackListEntry;
|
||||||
|
} else if (blackListedErrors.count < 10000) {
|
||||||
|
blackListedErrors["#" + message] = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
var payload = {
|
var payload = {
|
||||||
|
|
Ładowanie…
Reference in New Issue