diff options
author | Hailey <me@haileyok.com> | 2024-05-01 01:08:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-01 01:08:59 -0700 |
commit | b8d8bec388744c95aa84c955849d2bced45daf11 (patch) | |
tree | 987435632fae8bbfea56c935e6d55021356b636a /src/screens/Signup/state.ts | |
parent | 81ae7e425dc52846c5d4c282a0422a3875d84e2f (diff) | |
download | voidsky-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/state.ts')
-rw-r--r-- | src/screens/Signup/state.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/screens/Signup/state.ts b/src/screens/Signup/state.ts index 86a144368..d6cf9c44c 100644 --- a/src/screens/Signup/state.ts +++ b/src/screens/Signup/state.ts @@ -246,6 +246,10 @@ export function useSubmitSignup({ !verificationCode ) { dispatch({type: 'setStep', value: SignupStep.CAPTCHA}) + logger.error('Signup Flow Error', { + errorMessage: 'Verification captcha code was not set.', + registrationHandle: state.handle, + }) return dispatch({ type: 'setError', value: _(msg`Please complete the verification captcha.`), @@ -282,20 +286,17 @@ export function useSubmitSignup({ return } - if ([400, 429].includes(e.status)) { - logger.warn('Failed to create account', {message: e}) - } else { - logger.error(`Failed to create account (${e.status} status)`, { - message: e, - }) - } - const error = cleanError(errMsg) const isHandleError = error.toLowerCase().includes('handle') dispatch({type: 'setIsLoading', value: false}) - dispatch({type: 'setError', value: cleanError(errMsg)}) + dispatch({type: 'setError', value: error}) dispatch({type: 'setStep', value: isHandleError ? 2 : 1}) + + logger.error('Signup Flow Error', { + errorMessage: error, + registrationHandle: state.handle, + }) } finally { dispatch({type: 'setIsLoading', value: false}) } |