diff options
Diffstat (limited to 'source/libs/utils.ts')
-rw-r--r-- | source/libs/utils.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/libs/utils.ts b/source/libs/utils.ts index 68ff552b..364c271d 100644 --- a/source/libs/utils.ts +++ b/source/libs/utils.ts @@ -4,8 +4,14 @@ import stripIndent from 'strip-indent'; import {isRepo, isPR, isIssue} from './page-detect'; import compareVersions from 'tiny-version-compare'; -export function logError(featureName: typeof __featureName__, error: Error | string, ...extras: unknown[]): void { +export function logError(featureName: FeatureName, error: Error | string, ...extras: unknown[]): void { const message = typeof error === 'string' ? error : error.message; + + if (message.includes('token')) { + console.log(`âšī¸ Refined GitHub â ${featureName} â`, message); + return; + } + // Don't change this to `throw Error` because Firefox doesn't show extensions' errors in the console. // Use `return` after calling this function. console.error( |