(err: Error)
| 606 | * in which case, it loses its class and has only the fields. |
| 607 | */ |
| 608 | export function sendToAnalyticsAndSentry(err: Error) { |
| 609 | const possiblyHashedError = hashErrorIfNeeded(err); |
| 610 | // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX! |
| 611 | // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX! |
| 612 | const shouldNotReportToSentry = Boolean(err.isUserError || err.code === 'EACCES'); |
| 613 | // only level FATAL are reported to Sentry. |
| 614 | const level = shouldNotReportToSentry ? LEVEL.INFO : LEVEL.FATAL; |
| 615 | Analytics.setError(level, possiblyHashedError); |
| 616 | } |
| 617 | |
| 618 | function handleNonBitCustomErrors(err: Error): string { |
| 619 | // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX! |
no test coverage detected