chore: Remove console.log left in code and added eslint rule to prevent it happening again

This commit is contained in:
Tom Moor
2023-04-11 22:15:52 -04:00
parent a9800165c1
commit 49d903d6d4
19 changed files with 59 additions and 47 deletions

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { IncomingMessage } from "http";
import chalk from "chalk";
import { isEmpty, isArray, isObject, isString } from "lodash";

View File

@@ -32,9 +32,6 @@ if (env.SENTRY_DSN) {
export function requestErrorHandler(error: any, ctx: AppContext) {
// we don't need to report every time a request stops to the bug tracker
if (error.code === "EPIPE" || error.code === "ECONNRESET") {
console.warn("Connection error", {
error,
});
return;
}
@@ -69,6 +66,7 @@ export function requestErrorHandler(error: any, ctx: AppContext) {
Sentry.captureException(error);
});
} else {
// eslint-disable-next-line no-console
console.error(error);
}
}