From 072e2c20e3bd979afbef3f5b977c2eac18f8fbf8 Mon Sep 17 00:00:00 2001 From: Gilbert Date: Wed, 1 May 2024 18:31:19 -0500 Subject: [PATCH] Add missing file --- packages/frontend/src/utils/log-error.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/frontend/src/utils/log-error.ts diff --git a/packages/frontend/src/utils/log-error.ts b/packages/frontend/src/utils/log-error.ts new file mode 100644 index 00000000..96885cc4 --- /dev/null +++ b/packages/frontend/src/utils/log-error.ts @@ -0,0 +1,7 @@ +import Bugsnag from '@bugsnag/js'; + +export function logError(error: Error) { + if (import.meta.env.VITE_BUGSNAG_API_KEY) { + Bugsnag.notify(error); + } +}