Skip to content
New issue

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

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

Already on GitHub? # to your account

Rethrow MSAL AuthErrors in NAA flow #7559

Merged
merged 3 commits into from
Feb 6, 2025
Merged

Rethrow MSAL AuthErrors in NAA flow #7559

merged 3 commits into from
Feb 6, 2025

Conversation

salaman
Copy link
Collaborator

@salaman salaman commented Feb 6, 2025

NAA flow catches errors and runs them through fromBridgeError, but not all errors in the try come from the bridge. Notably, fromNaaTokenResponse can throw a ClientAuthError if a token is empty, and cache codepaths can throw some CacheErrors.

This PR ensures that if an error is already an MSAL AuthError, it does not get passed through fromBridgeError again and converted into an unknown_error.

@salaman salaman merged commit 41d9dcc into dev Feb 6, 2025
7 checks passed
@salaman salaman deleted the naa-autherror branch February 6, 2025 23:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
msal-browser Related to msal-browser package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants