Skip to content

Commit

Permalink
log login errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbolikowski committed Jan 12, 2024
1 parent 40082a0 commit 0c0b5ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/redi-connect/src/pages/front/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default function Login() {
try {
await login(formik.values.username, formik.values.password)
} catch (err) {
console.log(err)
formik.setSubmitting(false)
setLoginError('You entered an incorrect email, password, or both.')
return
Expand Down Expand Up @@ -126,7 +127,7 @@ export default function Login() {
const goto = urlParams.get('goto') ?? '/app/me'
return history.push(goto)
} catch (err) {
// Do nothing
console.log(err)
}

// IF NO CON PROFILE, TRY TO CREATE ONE FROM TP
Expand Down Expand Up @@ -162,7 +163,7 @@ export default function Login() {
return history.push('/front/signup-complete/mentee')
}
} catch (err) {
// Do nothing, continue
console.log(err)
}

// IF NO CON PROFILE AND NO TP PROFILE, TRY TO CREATE ONE FROM JWT
Expand Down Expand Up @@ -195,6 +196,7 @@ export default function Login() {
// If we reach this place, it means that the user does not have a TP
// profile nor do the have data in their JWT token from the CON sign-up,
// OR, something went wrong on the server. In that case, show them an error message.
console.log(err)
formik.setSubmitting(false)
setLoginError(
'Something unexpected happened, please try again or contact the ReDI Career Support Team at career@redi-school.org'
Expand Down

0 comments on commit 0c0b5ce

Please sign in to comment.