Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Getting started success toast always triggered #12374

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

esizer
Copy link
Member

@esizer esizer commented Dec 24, 2024

πŸ€– Resolves #12327

πŸ‘‹ Introduction

Fixes and issue where the getting started form was always displaying the success message, even on failure.

πŸ•΅οΈ Details

Looks as though we were not rejecting the promise when there was an error on the main mutation, only in the mutation that occurs after. This lead to our error exchange showing an error toast and the success toast running regardless if there was an error.

πŸ§ͺ Testing

Note

On success, you may still see error toast but this is going to be expected if you selected "verify email" submit action and do not have a GC Notify API key set. Technically this is correct since account creation is successful and the error is sending the verification email.

  1. Build the app pnpm run dev:fresh
  2. Login as a new user
  3. On the first step of account registration, set contact email to one that exists ([email protected])
  4. Submit form
  5. Confirm no success message happens
  6. Update email to be on that has not been taken
  7. Submit form
  8. Confirm success toast

@mnigh mnigh self-requested a review December 27, 2024 20:09
Copy link
Contributor

@mnigh mnigh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM πŸ‘

Screenshot

Screen Shot 2024-12-27 at 15 16 51

@esizer esizer added this pull request to the merge queue Dec 27, 2024
Merged via the queue into main with commit b1b6fad Dec 27, 2024
16 checks passed
@esizer esizer deleted the 12327-fix-conflicting-toasts-getting-started branch December 27, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

πŸ› Create account - conflicting toasts
2 participants