about summary refs log tree commit diff
path: root/src/screens/Signup/index.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-05-01 01:08:59 -0700
committerGitHub <noreply@github.com>2024-05-01 01:08:59 -0700
commitb8d8bec388744c95aa84c955849d2bced45daf11 (patch)
tree987435632fae8bbfea56c935e6d55021356b636a /src/screens/Signup/index.tsx
parent81ae7e425dc52846c5d4c282a0422a3875d84e2f (diff)
downloadvoidsky-b8d8bec388744c95aa84c955849d2bced45daf11.tar.zst
sentry errors for captcha web views and registration attempts (#3761)
* sentry errors for captcha web views

* include handles with errors

* log all registration request failures

* rm

* use a better trigger for web captcha errors

* add another trigger for recording a possible signup error

* unknown error type

* don't needlessly log on href errors

* honestly i probably cant always do a captcha in 20 seconds

* rm log

* timeout on back

* remove unnecessary colons
Diffstat (limited to 'src/screens/Signup/index.tsx')
-rw-r--r--src/screens/Signup/index.tsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/screens/Signup/index.tsx b/src/screens/Signup/index.tsx
index 6758f7fa1..5e2596d8c 100644
--- a/src/screens/Signup/index.tsx
+++ b/src/screens/Signup/index.tsx
@@ -8,6 +8,7 @@ import {useAnalytics} from '#/lib/analytics/analytics'
 import {FEEDBACK_FORM_URL} from '#/lib/constants'
 import {logEvent} from '#/lib/statsig/statsig'
 import {createFullHandle} from '#/lib/strings/handles'
+import {logger} from '#/logger'
 import {useServiceQuery} from '#/state/queries/service'
 import {useAgent} from '#/state/session'
 import {LoggedOutLayout} from '#/view/com/util/layouts/LoggedOutLayout'
@@ -119,11 +120,19 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
 
   const onBackPress = React.useCallback(() => {
     if (state.activeStep !== SignupStep.INFO) {
+      if (state.activeStep === SignupStep.CAPTCHA) {
+        logger.error('Signup Flow Error', {
+          errorMessage:
+            'User went back from captcha step. Possibly encountered an error.',
+          registrationHandle: state.handle,
+        })
+      }
+
       dispatch({type: 'prev'})
     } else {
       onPressBack()
     }
-  }, [onPressBack, state.activeStep])
+  }, [onPressBack, state.activeStep, state.handle])
 
   return (
     <SignupContext.Provider value={{state, dispatch}}>