diff --git a/frontend/src/scenes/authentication/passwordResetLogic.ts b/frontend/src/scenes/authentication/passwordResetLogic.ts index a0240f016fa36..854a24a225d48 100644 --- a/frontend/src/scenes/authentication/passwordResetLogic.ts +++ b/frontend/src/scenes/authentication/passwordResetLogic.ts @@ -1,3 +1,4 @@ +import { captureException } from '@sentry/react' import { kea, path, reducers } from 'kea' import { forms } from 'kea-forms' import { loaders } from 'kea-loaders' @@ -69,7 +70,9 @@ export const passwordResetLogic = kea([ try { await api.create('api/reset/', { email }) } catch (e: any) { - actions.setRequestPasswordResetManualErrors(e) + actions.setRequestPasswordResetManualErrors({ email: e.detail ?? 'An error occurred' }) + captureException('Failed to reset password', { extra: { error: e } }) + throw e } }, }, @@ -104,6 +107,7 @@ export const passwordResetLogic = kea([ window.location.href = '/' // We need the refresh } catch (e: any) { actions.setPasswordResetManualErrors({ password: e.detail }) + throw e } }, },