Make reporter ignore useless Discord errors (#1829)
This commit is contained in:
parent
fe60a72b80
commit
ae1dc4eab0
@ -61,6 +61,13 @@ const report = {
|
|||||||
otherErrors: [] as string[]
|
otherErrors: [] as string[]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const IGNORED_DISCORD_ERRORS = [
|
||||||
|
"KeybindStore: Looking for callback action",
|
||||||
|
"Unable to process domain list delta: Client revision number is null",
|
||||||
|
"Downloading the full bad domains file",
|
||||||
|
/\[GatewaySocket\].{0,110}Cannot access '/
|
||||||
|
] as Array<string | RegExp>;
|
||||||
|
|
||||||
function toCodeBlock(s: string) {
|
function toCodeBlock(s: string) {
|
||||||
s = s.replace(/```/g, "`\u200B`\u200B`");
|
s = s.replace(/```/g, "`\u200B`\u200B`");
|
||||||
return "```" + s + " ```";
|
return "```" + s + " ```";
|
||||||
@ -86,6 +93,8 @@ async function printReport() {
|
|||||||
console.log(` - Error: ${toCodeBlock(p.error)}`);
|
console.log(` - Error: ${toCodeBlock(p.error)}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
report.otherErrors = report.otherErrors.filter(e => !IGNORED_DISCORD_ERRORS.some(regex => e.match(regex)));
|
||||||
|
|
||||||
console.log("## Discord Errors");
|
console.log("## Discord Errors");
|
||||||
report.otherErrors.forEach(e => {
|
report.otherErrors.forEach(e => {
|
||||||
console.log(`- ${toCodeBlock(e)}`);
|
console.log(`- ${toCodeBlock(e)}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user