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

feat: Improve popup open error #1292

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ArthurKnoep
Copy link

Changes

This PR introduces a new error class for the getTokenWithPopup method: PopupOpenError. This error will be thrown if the method is unable to open the popup (most likely because it has been blocked by the browser).

Having a specific error class makes it much easier to catch the error and do specific error handling (such as explaining to the users how to allow popups on their browser)

This PR should be retro-compatible with all developpers running a string comparison with the error message to detect popup permission issues as it uses the same error message.

References

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@ArthurKnoep ArthurKnoep requested a review from a team as a code owner August 14, 2024 13:17
@ArthurKnoep ArthurKnoep changed the title feat(getTokenWithPopup): Improve popup open error feat: Improve popup open error Aug 14, 2024
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.

1 participant