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

chore(auth): improve error message on failure of getCurrentUser while dispatching signedIn event #13019

Merged
merged 4 commits into from
Feb 16, 2024

Conversation

HuiSF
Copy link
Contributor

@HuiSF HuiSF commented Feb 15, 2024

Description of changes

This is an action item came out while triaging issue: #12873

Now it handles error that may be thrown from the getCurrentUser() call used by dispatching the signedIn Auth Hub event, and convert the error to be more contextual.

Error message wording is open for suggestion.

Before:

image

After:

image

Issue #, if available

Description of how you validated changes

  • Unit tests
  • Sample app testing locally observing the error handling behavior

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@HuiSF HuiSF requested a review from a team as a code owner February 15, 2024 23:37
Copy link
Contributor

@israx israx left a comment

Choose a reason for hiding this comment

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

Looks good. Any reason to include the console.log ?

@HuiSF HuiSF force-pushed the hui/chore/auth/improve-signed-in-event-failure branch from 51ea556 to ab83106 Compare February 15, 2024 23:49
@HuiSF HuiSF requested a review from israx February 15, 2024 23:50
Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>
cshfang
cshfang previously approved these changes Feb 15, 2024
@HuiSF HuiSF force-pushed the hui/chore/auth/improve-signed-in-event-failure branch from cd67cef to 3412888 Compare February 15, 2024 23:56
cshfang
cshfang previously approved these changes Feb 15, 2024
@HuiSF HuiSF merged commit e4ae0f6 into main Feb 16, 2024
30 checks passed
@HuiSF HuiSF deleted the hui/chore/auth/improve-signed-in-event-failure branch February 16, 2024 17:24
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.

None yet

4 participants