Skip to content

Conversation

@duvld
Copy link
Member

@duvld duvld commented Jan 20, 2023

Reasoning for implementing this way:

  • I didn't want to change any of the fetchData code in api.ts and because of the how fetch throw errors so I do the check in the response handler
  • I didn't want to make a function to just check the type so I opted for an attribute check

Description

When a bad email is sent the user isn't notified, this adds a basic error to let the user know.

Base automatically changed from sso-a11y-new-buttons to beta February 27, 2023 17:36
@noliveleger noliveleger force-pushed the beta branch 2 times, most recently from d0b0d13 to fd5246d Compare April 6, 2023 18:46
@Akuukis Akuukis deleted the branch main October 1, 2024 17:16
@Akuukis Akuukis closed this Oct 1, 2024
@Akuukis Akuukis reopened this Oct 1, 2024
@Akuukis Akuukis changed the base branch from beta to main October 1, 2024 17:25
@jnm jnm added the Front end label Nov 11, 2024
@magicznyleszek magicznyleszek self-requested a review January 30, 2025 15:10
@Akuukis Akuukis assigned duvld and magicznyleszek and unassigned duvld May 14, 2025
@magicznyleszek magicznyleszek changed the title Add error handling to email section Add error handling to email section DEV-1119 Oct 3, 2025
@magicznyleszek
Copy link
Member

I've created a linear issue to make it more manageable to tackle it https://linear.app/kobotoolbox/issue/DEV-1119/fixaccountsettings-error-handling-in-email-section

@magicznyleszek magicznyleszek changed the title Add error handling to email section DEV-1119 fix(accountSettings): error handling in email section DEV-1119 Oct 3, 2025
@magicznyleszek magicznyleszek changed the title fix(accountSettings): error handling in email section DEV-1119 fix(accountSettings): error handling in email section DEV-1119 (old PR) Oct 9, 2025
magicznyleszek added a commit that referenced this pull request Oct 15, 2025
### 📣 Summary

Displays error in UI when changing email and API validates the proposed
email as invalid.

### 💭 Notes

Supersedes #4224.

### 👀 Preview steps

To test error handling from BE, go to `emailSection.component.tsx` and
modify `handleSubmit` function (comment out all the lines but
`setNewUserEmail(email.newEmail)`).

1. ℹ️ have an account
2. go to Account Settings → Security
3. type wrong email and use "Change" button
4. 🔴 [on main] no error being displayed
5. 🟢 [on PR] error being displayed next to the button
@magicznyleszek
Copy link
Member

Closing in favor of #6350

@magicznyleszek magicznyleszek deleted the sso-frontend-error-handling branch October 15, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants