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); + } +}