forgot-form-fox
This commit is contained in:
parent
90cf0a9e10
commit
27711d7e99
|
@ -65,21 +65,16 @@ export const ForgotPasswordForm = () => {
|
|||
email: email(),
|
||||
redirect_uri: window.location.origin,
|
||||
})
|
||||
if (data) {
|
||||
console.debug('[ForgotPasswordForm] authorizer response:', data)
|
||||
setMessage(data.message)
|
||||
}
|
||||
if (errors) {
|
||||
|
||||
console.warn(errors)
|
||||
if (errors) {
|
||||
const error: Error = errors[0]
|
||||
if (error.cause === 'user_not_found') {
|
||||
if (errors.some((e) => e.cause === 'user_not_found')) {
|
||||
setIsUserNotFound(true)
|
||||
return
|
||||
} else {
|
||||
setSubmitError(error.message)
|
||||
}
|
||||
}
|
||||
const errorText = errors.map((e) => e.message).join(' ') // FIXME
|
||||
setSubmitError(errorText)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
|
Loading…
Reference in New Issue
Block a user