From f7d6d02b27a6b2e6fc60c6b3a8cf5eba5cf72f0d Mon Sep 17 00:00:00 2001 From: Gilbert Date: Wed, 1 May 2024 18:23:51 -0500 Subject: [PATCH] Quick error logging (will clean this up later) --- packages/frontend/src/pages/auth/Login.tsx | 3 +++ packages/frontend/src/pages/auth/SignUp.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/frontend/src/pages/auth/Login.tsx b/packages/frontend/src/pages/auth/Login.tsx index 0757cf26..b590f357 100644 --- a/packages/frontend/src/pages/auth/Login.tsx +++ b/packages/frontend/src/pages/auth/Login.tsx @@ -18,6 +18,7 @@ import { Link } from 'react-router-dom'; import { PKPEthersWallet } from '@lit-protocol/pkp-ethers'; import { signInWithEthereum } from 'utils/siwe'; import { useSnowball } from 'utils/use-snowball'; +import { logError } from 'utils/log-error'; type Provider = 'google' | 'github' | 'apple' | 'email' | 'passkey'; @@ -52,12 +53,14 @@ export const Login = ({ onDone }: Props) => { setError(result.error); setProvider(false); wallet = undefined; + logError(new Error(result.error)); return; } } catch (err: any) { setError(err.message); console.log(err.message, err.name, err.details); setProvider(false); + logError(err); return; } } diff --git a/packages/frontend/src/pages/auth/SignUp.tsx b/packages/frontend/src/pages/auth/SignUp.tsx index bcfa48db..fa4fd4b7 100644 --- a/packages/frontend/src/pages/auth/SignUp.tsx +++ b/packages/frontend/src/pages/auth/SignUp.tsx @@ -16,6 +16,7 @@ import { Link } from 'react-router-dom'; import { useToast } from 'components/shared/Toast'; import { PKPEthersWallet } from '@lit-protocol/pkp-ethers'; import { signInWithEthereum } from 'utils/siwe'; +import { logError } from 'utils/log-error'; type Provider = 'google' | 'github' | 'apple' | 'email'; @@ -46,11 +47,13 @@ export const SignUp = ({ onDone }: Props) => { setError({ type: 'provider', message: result.error }); setProvider(false); wallet = undefined; + logError(new Error(result.error)); return; } } catch (err: any) { setError({ type: 'provider', message: err.message }); setProvider(false); + logError(err); return; } }